I have used autossh to monitor an ssh tunnel and restart it if necessary. On Wednesday 17/05/2017 at 2:13 pm, Iznogoud wrote: > Thanks for this info. you are saying processes will terminate if > trying to > write to stdout, but would otherwise stay alive if signals were set to > be > ignored, correct? > > >> >> >> An example of this that I use is a backgrounded ssh port forward: >> "ssh -L >> 1234:target.host:22 -N pivot.host &" >> I've had these last though complete logouts, which I like, until I >> really >> want it to terminate and need to run netstat -lnp to find it again. >> > > The last part, about finding them and terminating them, you are > looking for the > PID that is attached to the socket. I think for your purpose this > would work > best: 'ps axu | grep ssh | grep 1234' > > But I see your point. > > As a side note, I have not had much luck with non-executing ssh > tunnels (-N) > staying alive in most cases. I should also say, I am mostly using > reverse > tunnels (-R). > > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20170517/168014a9/attachment.html>