讓你的 Pietty 與 ssh 保持連線狀態

Published 27 八月, 2009 by kevingt

當使用 Pietty 與伺服器做 ssh 遠端連線時,只要 client 端閒置一段時間之後就會自動斷線,要如何讓你的 Pietty 與 ssh 保持連線呢?你可以這樣做~

 

編輯 sshd 設定檔

 
[root@linus ~]# vi /etc/ssh/sshd_config

————————————

將以下三行前面的 # 字號拿掉

#TCPKeepAlive yes
#ClientAliveInterval 0
#ClientAliveCountMax 3

就像下面這個樣子

TCPKeepAlive yes
ClientAliveInterval 0
ClientAliveCountMax 3

 
 

修改 Pietty 的參數

進入選項 ==> 詳細設定選擇 ==> connetction ==> 將 Seconds between keepalives [0 to turn off ] 輸入你想要每隔幾秒傳送一個封包訊息保持連線,這樣設定就可以了哦!

發表留言