jsch
jsch copied to clipboard
Unable to run commands in background even after using nohup and '&'
Hey Guys, I am making a ssh connection to a linux host where I try to run a script as a background process by using nohup and &, but the moment my connection closed the remote shell script also terminates.
Not sure why the nohup option is not working . Any idea?
Best Regards Robin
Hallo!
I have the same/similar issue. I'd like to exec
nohup tcpdump -i eth0.3 -w /tmp/direct.pcap > /dev/null 2>&1 &
but tcpdump is not started on target. Any idea how to solve that? Thanks!
Best regards, Sven
I had the problem blocking me for couple days till I saw this one: https://stackoverflow.com/questions/3783441/process-dies-after-jsch-exits
channel.setPty(false) it seems resolve my issue
Hey Jody,
Thanks for the link. I believe I have tried this option before and it did not help. I will anyways give it another shot just to be sure.
Regards Robin