限定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



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章