I've been trying to get commands to run after disconnecting via SSH. I'm currently running the following sort of template in a ChannelExec
nohup bash -c \" a series of bash commands \" < /dev/null > /dev/null 2>&1";
This works for the most part but most of the documentation I find suggests it should be done in the background i.e. nohup bash -c " stuff" &
However when I add a & on the end of the command I'm not seeing anything execute on the other side.
* Is there some syntax I'm missing here? All of these commands work when done through ssh from the commandline.
* Secondly without the & and executing in the foreground I'm seeing what looks like session disconnections on the remote side and having my process killed in midstream occasionally under load. Does anyone know why that could occur? Is it because I'm in the foreground?
__o __o __o __o
_`\<,_ _`\<,_ _`\<,_ _`\<,_
(*)/ (*) (*)/ (*) (*)/ (*) (*)/ (*)
Get latest updates about Open Source Projects, Conferences and News.