def execute(self,command): to_exec = self.transport.open_session() to_exec.exec_command(command) print 'Command executed' connection.execute("install.sh")
When I check the remote system, I found the script didn't run. Any clue?
subprocess.Popen('ssh thehost install.sh')
See the subprocess module.
subprocess