0

I have have been trying to use ssh for triggering some installation scripts over the network. Initially those scripts were using git clone but I kept getting error code 141 (which seems to be SIGPIPE according to git mailing list). Trying to replace git with wget shows the same issue, i.e.:

ssh user@server 'nohup wget http://google.ch &' // produce no result on the server
ssh user@server // then on the server
nohup wget http://google.ch & // works

Already tried with different servers (debian/ubuntu/vm/native). Using apt this way works though. Any idea on the reasons and suggested solutions? Thanks in advance.

Zifeo
  • 1
  • 2
  • Several responses here may help you. http://stackoverflow.com/questions/5185717/bash-spawn-subshell-for-ssh-and-continue-with-program-flow/5199505#5199505 .. Good luck. – shellter Dec 29 '15 at 05:07

1 Answers1

0

For those in similar situations, the pointer of @shellter was a good read (thanks !). One solution is to use -t -t as ssh flags and be careful not to include the background toggle in the command, i.e.:

ssh -t -t user@server 'nohup command' > /dev/null 2>&1 &
Zifeo
  • 1
  • 2