40 lines
1.5 KiB
Plaintext
40 lines
1.5 KiB
Plaintext
Include /Users/timmy/.colima/ssh_config
|
||
Include config.d/*
|
||
|
||
# Fig ssh integration. Keep at the bottom of this file.
|
||
Match all
|
||
Include ~/.fig/ssh
|
||
|
||
Host github.com
|
||
IdentityFile ~/.ssh/id_rsa
|
||
AddKeysToAgent yes
|
||
|
||
# --- Global Settings ---
|
||
Host *
|
||
|
||
# StrictHostKeyChecking no # 不進行 Strict HostKey 檢查
|
||
# UserKnownHostsFile /dev/null # 不使用 KnownHosts 檔案
|
||
# —— 連線穩定與正常結束 ——
|
||
TCPKeepAlive yes # 啟用 TCP KeepAlive 功能
|
||
ServerAliveInterval 60 # 每 60 秒向伺服器端發送一次請求
|
||
ServerAliveCountMax 5 # 若伺服器端 5 次無回應則中斷連接
|
||
ExitOnForwardFailure yes # 若連線轉發失敗立即退出,避免殘留 session
|
||
|
||
# —— Multiplexing(加速多連線,減少殘留程序)——
|
||
ControlMaster auto # 自動使用 ControlMaster 功能
|
||
ControlPath ~/.ssh/sockets/%r@%h-%p # 設定 ControlPath
|
||
ControlPersist 5m # 主連線關掉後,socket 最多保留 5 分鐘
|
||
|
||
# —— 安全性建議(擇一)——
|
||
# 預設:保留嚴格檢查(建議)
|
||
#StrictHostKeyChecking ask
|
||
# 或想少互動但仍相對安全:
|
||
#StrictHostKeyChecking accept-new
|
||
|
||
# —— 代理/金鑰(依你目前環境)——
|
||
IdentityAgent /Users/timmy/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
|
||
|
||
CheckHostIP no # 不檢查 IP 位址是否變更
|
||
VisualHostKey no # 不顯示伺服器端的 HostKey
|
||
|