ssh session idle timeout

Solution 1:

Yes. Configure SSH to send keepalive packets.

Solution 2:

I've found that the keepalive behaviour didn't quite work. I tried adding the ServerAliveInterval to the ~/.ssh/config script but it doesn't play nice with git.

What I've ended up doing is adding a timestamp to my 'screen' status bar. This is enough activity to keep the connection up.

Solution 3:

You can configure Putty to send keep alive packets too.

In Settings, Connection, Seconds between keepalives.

Solution 4:

First, you need to determine if it's your shell which is logging you out or ssh. To test, ssh into your remote machine, and vi or less a file.

If a long time later you can still move around less/vi, then ssh is fine. In this case, determine what shell you are using, and disable the timeout. It's most likely the shell which is timing you out and not SSH. However, some firewalls will close idle sessions if keep alives aren't sent.

The Solaris administrator may prevent you from disabling the timeout in your shell, by making the setting read-only. This is unlikely, but possible. You can usually get around this by using a different shell.

Solution 5:

If you have trouble re-configuring your shell again, you could use GNU screen. If your SSH session times out, just login again and reconnect and your shell will be just as it was.