ssh

/etc/ssh/sshd_config

#PrintLastLog yes

TCPKeepAlive yes

#UseLogin no

http://www.linuxscrew.com/2007/08/27/secure-shell-ssh-session-timeout/

Hi P.E.,

Here are some directives of SSH server’s sshd_config that are related to session timeouts:

ClientAliveInterval

TCPKeepAlive

KeepAlive

Here are some directives of client’s ssh_config:

ServerAliveInterval

TCPKeepAlive

sshd_config and ssh_config are usually located at /etc/ssh directory of server and client.

These directives are are widely described by man sshd_config and man ssh_config but default settings may be different from distro to distro.

P.S. As for me, I found first tip of current post the most useful as it works brilliantly at every *nix machines I was working with via ssh (just make ping 127.0.0.1 when you’re going to leave ssh terminal untouched for some time).

P.P.S. Another nice workaround is to use screen utility. In case you use it you can be sure that you won’t loose any output of commands you’ve started. Here is little notice how to use it.

Good luck!

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s