'Gracefully close the SSH connection.'

def disconnect(self):

    self.cleanup()
    if (self.protocol == u'ssh'):
        self.remote_conn_pre.close()
    elif (self.protocol == u'telnet'):
        self.remote_conn.close()
