|
|
|
|
|
by apage43
6331 days ago
|
|
To fix constantly re-logging in to ssh:
- set up key authentication and run ssh user@host with your favorite parameters in a loop (shell script) so it reconnects when disconnected.
- in fact, have it run screen when connected, so you get right back to where you were effortlessy. As for port forwarding, you will still be disconnected from everything on connectivity blips when ssh has to reconnect if you use ssh port forwarding. Try a VPN setup instead. You might have to fiddle with the host to keep it from sending RST's/FIN's as soon as you drop (though it shouldn't unless a packet for you comes in during the blip, I think). When you come back, if you come back soon enough, the connections should be restored without having been disconnected. (AS LONG as you have the same IP address on the VPN, so use a static IP setup) Also, if you run your SSH -through- the VPN connection and recover quickly enough SSH shouldn't disconnect at all either. More Edit: For long connectivity lapses (changing locations) all your TCP connections -will- drop. This is not something you can work around. |
|
Regarding the VPN, could this connection be automatically established upon joining a wireless network? (i think you see where i'm going with this question)