Sunday, February 17, 2008

Config Idle Timeout for openSSH Fedora

With some ssh servers, you can config the time out in /etc/ssh/sshd_config like

IdleTimeOut=10m

However, the openssh shipped with Fedora doesn't support this option.
Two workarounds are:
  • Apply openssh watchdog patch
http://www.sc.isc.tohoku.ac.jp/~hgot/sources/openssh-watchdog.html
  • use TMOUT for shell
In /etc/profile
#set the idle timeout for ssh to 10minutes
TMOUT=600

readonly TMOUT

export TMOUT


Notice here, need to set the TMOUT to readonly, otherwise users can override it.