Unrelated in many ways, but I have the reverse problem:
When I suspend my Linux machine, my ssh connections are lost.
Anyone know of a good solution for this?
PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.
WDYM lost? do you roam? I used to have a job with simple OpenVPN to connect to the servers (via public IP, just routed through the VPN tunnel) and ssh connections stayed during my trip from office to home. Probably needs both sides not to be overly aggressive with keepalives and such. VPN just reconnected at home, but tun0 device and its local ip stayed the same, ssh connections also stayed.
If you do not roam other side may do TCP keepalives or even ssh protocol keepalives and close the connection for you. Unless you can tune that, not much to do.
Other solutions might be mosh (mobile shell; haven't tried) or just running screen or tmux on the other end and just resume where you left of after quick reconnect.
When I suspend my Linux machine, my ssh connections are lost.
Anyone know of a good solution for this?
PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.