-->

Wednesday, November 30, 2016

Setting Stricthostkeychecking and SSH session timeout on Linux Server

While working on the Linux server its common to face the ssh session timeout from the server due to ideal session. Although you can prevent the session timeout from the server and client.

Setup the ServerAliveInterval in your user account to provide the extended time for session timeout i.e. 120 seconds

 vim .ssh/config  

 Host *
   ServerAliveInterval 120

 chmod 600 .ssh/config

If you are using the Bastion host in your corporate environment to connect to the Different Server than you can edit the sshd_config file  and make an entry as below to increase the session timeout for the ssh

 vim /etc/ssh/sshd_config  

 ## ssh ideal timeout value
  ClientAliveInterval 120