(self,cmd,pty=False,timeout=None,background=False)
| 132 | self.ssh.connect(hostname = self.mac,username = self.user,key_filename=keyfile_name,timeout = timeout) |
| 133 | |
| 134 | def execute(self,cmd,pty=False,timeout=None,background=False): |
| 135 | if not background: |
| 136 | return self.ssh.exec_command(cmd,get_pty=pty,timeout=timeout) |
| 137 | else: |
| 138 | print("exe",cmd,"in background") |
| 139 | transport = self.ssh.get_transport() |
| 140 | channel = transport.open_session() |
| 141 | return channel.exec_command(cmd) |
| 142 | |
| 143 | def execute_w_channel(self,cmd): |
| 144 | transport = self.ssh.get_transport() |