'Returns True if we are connected.
Example:
>>> s =  ssh(host=\'example.pwnme\',
...         user=\'travis\',
...         password=\'demopass\')
>>> s.connected()
True
>>> s.close()
>>> s.connected()
False'

def connected(self):

    return bool((self.client and self.client.get_transport().is_active()))
