Mac下ssh鏈接遠程服務器時自動斷開問題

  1. 使用自帶終端或iterm2,iterm2界面和用戶體驗更好一點
  2. 服務端:/etc/profile文件中配置TMOUT=0,
    export TMOUT=0 #設置變量
    source /etc/profile生效,從新登陸用戶
  3. 客戶端:~/.ssh/config文件中配置
    Host *
    ServerAliveInterval 60

臨時方法

TMOUT=0ssh

相關文章
相關標籤/搜索