code: def open(self):
          
  
          logger.debug('Connecting to device %s, vdom %s' % (self.hostname, self.vdom))
  
          self.ssh = paramiko.SSHClient()
          self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  
          cfg = {
              'hostname': self.hostname,
              'timeout': self.timeout,
              'username': self.username,
              'password': self.password,
              'key_filename': self.keyfile
          }
  
          if os.path.exists(os.path.expanduser("~/.ssh/config")):
              ssh_config = paramiko.SSHConfig()
              user_config_file = os.path.expanduser("~/.ssh/config")
              with io.open(user_config_file, 'rt', encoding='utf-8') as f:
                  ssh_config.parse(f)
  
              host_conf = ssh_config.lookup(self.hostname)
              if host_conf:
                  if 'proxycommand' in host_conf:
                      cfg['sock'] = paramiko.ProxyCommand(host_conf['proxycommand'])
                  if 'user' in host_conf:
                      cfg['username'] = host_conf['user']
                  if 'identityfile' in host_conf:
                      cfg['key_filename'] = host_conf['identityfile']
                  if 'hostname' in host_conf:
                      cfg['hostname'] = host_conf['hostname']
  
          self.ssh.connect(**cfg)
docs: Opens the ssh session with the device.