Issue
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.
Solution
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 &
Answered By - Zifeo