notes/config/ssh/ssh_config

42 lines
978 B
Plaintext

ForwardAgent yes
Host github.com
Port 22
HostName github.com
User Soundwave
IdentityFile ~/.ssh/id_rsa_github
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Host *.baidu.com
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
ControlPersist yes
ServerAliveInterval 60
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
Host *.baidu-int.com
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
ControlPersist yes
ServerAliveInterval 60
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
ControlPersist yes
ServerAliveInterval 60
# openssh 升级后需要指定算法连接服务器
# $(ssh -V): OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021
# HostKeyAlgorithms +ssh-rsa
# PubkeyAcceptedKeyTypes +ssh-rsa