From: Enling Li Date: 2009-07-10T12:35:56+09:00 Subject: Re: how can I start a shell process and return immediately? Rob, That does not work either. I tried from shell befreo running the ruby script remotely. ssh.exec!("/bin/bash -c /usr/bin/setsid /usr/bin/perl /root/test.pl") ssh.exec!("/bin/bash /usr/bin/setsid /usr/bin/perl /root/test.pl") ssh.exec!("/bin/bash /usr/bin/setsid /root/test.pl") They just don't work from ruby Net::SSH Thanks. Enling Rob Biedenharn wrote: > On Jul 9, 2009, at 7:53 PM, Enling Li wrote: > >> >> Thanks. >> >> Enling > > OK, what about: > > ssh.exec!("sh -c 'setsid /root/test.pl > /dev/null 2>&1'") > > or perhaps bash, /bin/sh, or /bin/bash in place of sh > > Of course, I'm assuming that you are verifying that you can ssh > manually and run these commands yourself. (If not, get to a command > that works even after you log out manually.) > > -Rob -- Posted via http://www.ruby-forum.com/.