More about sssh tunneling

Amedee Van Gasse (ub) amedee-ubuntu at amedee.be
Tue Jan 26 09:07:14 UTC 2010


On Tue, January 26, 2010 09:13, Sauro cesaretti wrote:
> Hello,
> As I wrote some days ago, I'm using an ssh tunneling to connect in a
> computer of a friend that is inside a protected network.
> Now, the tunneling is working fine, but if I'm not working in the remote
> computer, the tunnel will disconnect automatically.
> How can I fix this problem?
> Is there a time out control?

OpenSSH has an option called ServerAliveInterval which can be used to
prevent the connection from being idle for too long (as a bonus, it will
detect when the peer died sooner even if the connection is idle).
http://www.howtogeek.com/howto/linux/keep-your-linux-ssh-session-from-disconnecting/

> Is there a System that will reconnect the tunnel automatically, if it'll
> disconnect?

autossh will monitor an ssh tunnel and restart it as needed.


While autossh helps to restart ssh session... what I find to be really
useful is to run the 'screen' command. It allows you to RESUME your ssh
sessions even after you disconnect. Especially useful if your connection
is not as reliable as it should be.
http://www.howtogeek.com/howto/ubuntu/keep-your-ssh-session-running-when-you-disconnect/

-- 
Amedee





More information about the ubuntu-users mailing list