def invoke_shell(<EOL>self,<EOL>term="<STR_LIT>",<EOL>width=<NUM_LIT>,<EOL>height=<NUM_LIT>,<EOL>width_pixels=<NUM_LIT:0>,<EOL>height_pixels=<NUM_LIT:0>,<EOL>environment=None,<EOL>):
chan = self._transport.open_session()<EOL>chan.get_pty(term, width, height, width_pixels, height_pixels)<EOL>chan.invoke_shell()<EOL>return chan<EOL>
Start an interactive shell session on the SSH server.  A new `.Channel`
is opened and connected to a pseudo-terminal using the requested
terminal type and size.

:param str term:
    the terminal type to emulate (for example, ``"vt100"``)
:param int width: the width (in characters) of the terminal window
:param int height: the height (in characters) of the terminal window
:param int width_pixels: the width (in pixels) of the terminal window
:param int height_pixels: the height (in pixels) of the terminal window
:param dict environment: the command's environment
:return: a new `.Channel` connected to the remote shell

:raises: `.SSHException` -- if the server fails to invoke a shell