[GRLUG] question re terminal freezing

Adam Tauno Williams awilliam at whitemice.org
Fri Nov 22 15:28:53 EST 2013


On Fri, 2013-11-22 at 15:23 -0500, Greg Folkert wrote:
> On Fri, 2013-11-22 at 12:28 -0500, Eric Beversluis wrote:
> > When I'm connected to a computer via ssh from my terminal (in Fedora
> > 19), if I'm not active for a while the terminal seems to freeze up and
> > become unresponsive. All I can do is shut the terminal--and then I get a
> > warning that there is a process still running (the ssh connection?).
> > Is this expected behavior from the terminal? Is there some workaround so
> > I don't lose all the results that are in the existing terminal (other
> > than leaving it open while I work from a different terminal)?
> If this is "outside" your local network or you are using a consumer
> classed "router" to connect to locally. You are experiencing "session
> timeout".

+1

> Typically, 300 seconds is the session timeout.

Or an `idle` connection is being kicked from a NAT table in between
hither and thither.  More and more common as people continue to refuse
to use IPv6 and the sick disgusting disease that is NAT becomes more an
more prevalent.

> I add this to my /etc/ssh/ssh_config:
>         ServerAliveInterval 270
> This then makes you ssh client "ping" the server every 270 seconds. This
> doesn't hurt the server in any way, but does keep you session alive
> through you consumer grade router/firewall.

+1

> PCI Compliance doesn't like the "server version" of this in an
> SSHD_CONFIG, but you can put in /etc/ssh/sshd_config:
>         ClientAliveInterval 270
> This does the same thing, but forces the Server to try and keep your
> session alive.

The server version is nicer as you do not have to remember to do it on
all your clients; and your client will not try to do ping with a server
that does not enjoy it.

> If you need more info on this, I suggest you go get the O'Reilly book on
> SSH.
>         SSH, The Secure Shell: The Definitive Guide, 2nd Edition
> That will help you a lot. It is a few years old, but in all reality, SSH
> hasn't changed much. I've got it and it has really helped me finger out
> things much better with integration with SSH. Plus it is a nice
> reference for things rather than "man ssh" or "man ssh_config" or "man
> sshd_config"

Or, in a lazy case, run top or something that constantly changes on the
'idle' terminal.  That will keep the session alive, at least against
traffic related timeouts like the disgusting disease that is NAT.

-- 
Adam Tauno Williams <mailto:awilliam at whitemice.org> GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20131122/54471193/attachment.pgp>


More information about the grlug mailing list