Example #1
0
 def connect(self):
     cmd = ['ssh']
     cmd.extend(self._flags)
     cmd.extend([self._host, "-p", self._port, "-l", self._user])
     conn = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
     conn.name = self._name
     conn.agent = self
     self.connection = conn
Example #2
0
 def connect(self):
     conn = Popen(["/bin/sh"], stdin=PIPE, stdout=PIPE, stderr=PIPE,
                  close_fds=True)
     conn.name = self._name
     conn.agent = self
     self.connection = conn