On you client server (the one you connect from), open a terminal, type:
# vi /etc/ssh/ssh_config -- Not sshd_config add the following line to the end of the file: ServerAliveInterval 60
Then save it.
Adding this line will allow your SSH session send a null packet to the remote server at every 60 seconds (for inactivity) to keep SSH connection alive. You can change the value if you feel is too short or too long.
Not root?
If you don't have root permission, you can create a "config" file in your home dir:
# touch ~/.ssh/config Add the following two lines: Host * ServerAliveInterval 60
Save and exit. Then do a
# service ssh restart
You are good to go.
No comments:
Post a Comment