Hacker News new | ask | show | jobs
by np1810 1614 days ago
Thank you for such a thorough book...

This book does discuss autossh [1] which I came to know about recently while setting up my dynamic home ip (w/ CG-NAT) as the exit node in a wireguard network to overcome geo-restrictions on streaming services when traveling... :p

autossh [1] is such a simple and useful utility, wish I had known about it earlier when any connection changes in VPN/WiFi used to break my ssh tunnels to the corporate network during development...

If you're a frequent user of ssh tunnels, do check out autossh... ;)

[1] https://linux.die.net/man/1/autossh

1 comments

I used autossh many years ago. There was nothing wrong with it. But with systemd user service managers available everywhere I just put a normal ssh command into a service file with RestartAlways and activate linger for the user.

No need to install an extra package. No idea whether it is maintained or not, but I know systemd is, both upstream and in the distro.

> I used autossh many years ago. There was nothing wrong with it. But with systemd user service managers available everywhere I just put a normal ssh command into a service file with RestartAlways and activate linger for the user.

Thanks, there will be multiple ways to do same thing, user can choose whichever they find the easiest...

Adding an example of such systemd file - https://gist.github.com/drmalex07/c0f9304deea566842490

> No need to install an extra package. No idea whether it is maintained or not, but I know systemd is, both upstream and in the distro.

Definitely not updated with the same frequency as systemd... https://salsa.debian.org/debian/autossh