1. 程式人生 > >限定ssh登錄超時時間

限定ssh登錄超時時間

ssh

ssh登錄以後,如果限定時間內沒有操作側自動斷開連接

在 /etc/profile 文件中添加 TMOUT 變量,單位秒

添加並立即生效

[[email protected] 15:35 ~]

# echo "export TMOUT=1800" >> /etc/profile && source /etc/profile

長時間不操作,這裏設置的是1800秒,也就是30分鐘後斷開

[[email protected] 16:05 ~]

# timed out waiting for input: auto-logout



限定ssh登錄超時時間