'Initialize the terminal and connect to the new session.
Args:
width (int): Width of terminal.
height (int): Height of terminal.'

def terminalSize(self, width, height):

    self.terminal.eraseDisplay()
    self.terminal.cursorHome()
    self.width = width
    self.height = height
    client_address = self.getClientAddress()
    client_address = (client_address.host if client_address else None)
    self.init_session('ssh', client_address, self.cfactory.sessionhandler)
    if self.authenticated_player:
        self.logged_in = True
        self.uid = self.authenticated_player.user.id
    self.sessionhandler.connect(self)
