Ejemplo n.º 1
0
 def __init__(self,
              host,
              username,
              service='PVE',
              configfile=None,
              port=22,
              timeout=5,
              forward_ssh_agent=False,
              sudo=False,
              identity_file=None):
     self.host = host
     self.username = username
     self.configfile = configfile
     self.service = service.lower()
     self.port = port
     self.timeout = timeout
     self.forward_ssh_agent = forward_ssh_agent
     self.sudo = sudo
     self.identity_file = identity_file
     self.ssh_client = openssh_wrapper.SSHConnection(
         self.host,
         login=self.username,
         port=self.port,
         timeout=self.timeout,
         identity_file=self.identity_file)
Ejemplo n.º 2
0
 def getssh(self):
     self.logger.debug("ssh'ing to ship",
                       fqdn=self.fqdn,
                       login=self.username)
     import openssh_wrapper
     conn = openssh_wrapper.SSHConnection(self.fqdn, login=self.username)
     return conn
Ejemplo n.º 3
0
 def __init__(self,
              host,
              username,
              configfile=None,
              port=22,
              timeout=5,
              forward_ssh_agent=False):
     self.host = host
     self.username = username
     self.configfile = configfile
     self.port = port
     self.timeout = timeout
     self.forward_ssh_agent = forward_ssh_agent
     self.ssh_client = openssh_wrapper.SSHConnection(self.host,
                                                     login=self.username,
                                                     port=self.port,
                                                     timeout=self.timeout)