0

I am trying to start a small server on a remote machine via exec_command. The problem is that it always terminates the server when the channel object is destroyed. My current attempt looks kind of like this:

ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_client.connect(hostname='10.0.0.1',username='username',password='pw')
transport = ssh_client.get_transport()
channel_server = transport.open_session()
channel_server.exec_command('/home/server/streamtest')

I also tried it with ssh_client.exec_command directly with the same results.

Halp plz

JohannesW
  • 11
  • 3
  • Particularly see the [`nohup` solution by @cizixs](https://stackoverflow.com/a/32861743/850848). In general, this is not a Python nor Paramiko question, but rather a general Linux/SSH/shell question. – Martin Prikryl Apr 17 '18 at 06:03
  • 1
    Thank you that solved my problem. – JohannesW Apr 17 '18 at 12:21

0 Answers0