天天看點

Mac 上 iterm2 配置免密登入開發機

Mac 上 iterm2 配置免密登入開發機

環境

MAC電腦

系統自帶“終端”

目的

終端下已登入relay,打開新的視窗(command+t),可免密登入到relay

配置

打開檔案 ~/.ssh/config,儲存如下内容:

Host *

ControlMaster auto

ControlPath ~/.ssh/master-%[email protected]%h:%p

ControlPersist yes

ServerAliveInterval 60

ControlMaster #連接配接共享

ControlPath #與ControlMaster一起使用,指定連接配接共享的路徑

ControlPersist #與ControlMaster一起使用,在背景保持打開

ServerAliveInterval #與伺服器通訊的時間間隔(秒)

官方文檔:http://man.openbsd.org/ssh_config.5

以上内容親測有效 以上内容是在本地MAC上配置

我的配置

Mac 上 iterm2 配置免密登入開發機

長時間電腦處于待機、關機狀态 需要輸入密碼

mac

繼續閱讀