Hacker News new | ask | show | jobs
by ilyt 1035 days ago
> For forwarding I almost never do -f. It can be a footgun in making it hard to tell which forwards are still open or operational.

That kinda still is a problem when you have multiple shells open to the target server. I wish SSH exported it in any reasonable way aside from trying to get it myself from the process list...

1 comments

If you avoid -f you can also chain commands knowing the second will only be run when ssh is finished running. Something I do often:

  ssh host.example -N -D 1080 && wall "Socks proxy to host.example closed."
The second command can be as complex as you want but a message in all terminals usually does the job for me.