Many time shell remain idle and due to that SSH connection get closed by server and you need to relogin to the shell.
You will able to avoid this problem by increasing timeout in "sshd_config" configuration file.
Edit sshd_config file on the server and search for "ClientAliveInterval" parameter.
Edit file using any favorable editor.
Make below changes in the file.
From
To
Save the changes and restart the sshd service.
So that ssh connection never get disconnected for 7200 seconds.
You will able to avoid this problem by increasing timeout in "sshd_config" configuration file.
Edit sshd_config file on the server and search for "ClientAliveInterval" parameter.
Code:
[email protected] [~]# cat /etc/ssh/sshd_config | grep ClientAliveInterval #ClientAliveInterval 0
Code:
[email protected] [~]#vi /etc/ssh/sshd_config
From
Code:
#ClientAliveInterval 0
Code:
ClientAliveInterval 7200
Code:
[email protected] [~]# /etc/init.d/sshd restart