1

I'm writing a python code to launch a service in the remote server in background, which means the code does not wait until the process is done (its represent the server)

My code now is:

server_session = paramiko.SSHClient()
server_session.set_missing_host_key_policy(paramiko.AutoAddPolicy())
server_session.connect(SERVER[0], username=SERVER[1], password=SERVER[2])
server_session.exec_command('pkill python')
time.sleep(5)
server_session.exec_command(SERVER[3])

the exec_command does not do the job Thanks in advance

nam
  • 3,542
  • 9
  • 46
  • 68
  • Does this help: http://stackoverflow.com/questions/7734679/paramiko-and-exec-command-killing-remote-process ? – Ellioh Jan 15 '13 at 14:32
  • Not exactly, but I've found how to deal with it, i'm using fabric for this – nam Jan 29 '13 at 16:50

0 Answers0