Friday, October 19, 2012

Setting timeout parameters for ssh session



for removing  the timeout parameter   for ssh connection

clientAliveInterval  900 : means if the session is idle for  900 seconds session  will automatcally  timeout.




step 1 : and also comment following parameter in /etc/profile

# TMOUT=40


step 2 : uncomment in /etc/ssh/sshd_config file and set the "clientAliveInterval"  parameter:

clientAliveInterval 900
# TcpKeepAlive =yes
# ClientAlivecountMax 0

step 3 : stop the ssh services and again start the ssh services.


     # stopsrc -s sshd
     # startsrc -s sshd

 NOTE:  if you are not commenting TMOUT parameter, then the session will timeout if it is idle for 40 min even if you have commented the mentioned the parameters in sshd_config file.



for setting the timeout parameter to 10 minutes  for ssh connection

step 1: comment the TMOUT parameter in /etc/profile.
step 2: set the "clientAliveInterval 600" means session will timeout if idle for 10 min.
step 3: stop ths sshd services using "stopsrc -s sshd"
step 4: start the sshd services using "startsrc -s sshd"

No comments:

Post a Comment