Autossh – automatically restart SSH sessions and tunnels
51–60 of 90 posts
Re: Autossh – automatically restart SSH sessions and tunnels
#52I would still recommend it.
Re: Autossh – automatically restart SSH sessions and tunnels
#53Earlier quoted context omitted.
> autossh deals with this by actually passing traffic and taking action if traffic doesn't move. The `ServerAliveInterval` option above achieves this.
No, it actually doesn't, or at least not properly. It's not hard to get ssh sessions that are wedged.
Re: Autossh – automatically restart SSH sessions and tunnels
#54Re: Autossh – automatically restart SSH sessions and tunnels
#55Re: Autossh – automatically restart SSH sessions and tunnels
#56Re: Autossh – automatically restart SSH sessions and tunnels
#57Earlier quoted context omitted.
If you read what the person wrote, you'll see a ServerAliveInterval. If there are ServerAliveIntevalMaxCount (defaults to 3) attempts that fail, the ssh connection will drop. And systemd will restart it. Today you learned. Nice. I've dropped autossh for years and you can too, even on flaky connections.
Today I learned that some people make mistakes, but I already knew that ;) ServerAliveInterval doesn't do this properly and consistently. I've used my own autossh type script for two decades now. It's mostly used to give access to machines behind shitty NAT, and/or that have addresses that constantly change, and/or for systems on CGNAT, like Starlink. If ServerAliveInterval works so well and negates the need for some…
> For example, if you are using a recent version of OpenSSH, you may wish to explore using the ServerAliveInterval and ServerAliveCountMax options to have the SSH client exit if it finds itself no longer connected to the server. In many ways this may be a better solution than the monitoring port.
Re: Autossh – automatically restart SSH sessions and tunnels
#58Re: Autossh – automatically restart SSH sessions and tunnels
#59Not 100% the same use case as autossh was built for maybe, but I'm now simply throwing tailscale on every box i need to interact with. Does away with all the port forwarding stuff, it's absolutely delightful.
How much reliance on third party am I subjecting myself by using Tailscale? What happens if I make a local connection to a machine/service running on Tailscale, does it still go out of the local network? If so, is the bulk of the payload transferred locally? Is there any advantage on using it if the machine/service is easily accessible over ipv6?
Re: Autossh – automatically restart SSH sessions and tunnels
#60Not 100% the same use case as autossh was built for maybe, but I'm now simply throwing tailscale on every box i need to interact with. Does away with all the port forwarding stuff, it's absolutely delightful.
I like the idea of it but can't even imagine trying to get it past the cyber security folks.