[NBLUG/talk] ssh behind NAT

Eric Eisenhart eric at nblug.org
Wed Jul 23 09:50:21 PDT 2003


On Wed, Jul 23, 2003 at 09:38:17AM -0700, Steve wrote:
> I just put my home network behind a NAT Box (Linksys WiFI
> switch/router) and now my ssh clients if left open die.
> 
> I only read mail in my linux shell, so I like to keep my ssh session
> open all day and in my mail client (Mutt), but seems after an hour or so
> (not really sure how long) I come back and I'm disconnected.
> 
> This is not a shell time out, the connection just goes away.  I read
> somewhere that this does happen when behind a NAT box, and I thought I
> read about a fix for it, but I do not remember what it is, anyone know?

On the server, in /etc/ssh/sshd_config, make sure "KeepAlive yes" is on (if
you can) and on your end, in ~/.ssh/config, make sure "KeepAlive yes" is on.

This will help mitigate the problem slightly, but won't really solve it. 
Adjusting the NAT box to track connections longer might also help, but might
not be possible.
-- 
Eric Eisenhart
NBLUG Co-Founder & Vice-President Pro Tempore
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244



More information about the talk mailing list