
我有多个ssh钥匙对分别用于登陆不同的主机,怎么弄呢?
简单!
只要把他们都加到ssh-agent里就可以了!
#Start the ssh-agent in the background.
eval "$(ssh-agent -s)"
#Add your SSH private key to the ssh-agent.
ssh-add ~/.ssh/id_rsa
参见:https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
另外:
# list all
ssh-add -l
# delete all from ssh-agent
ssh-add -D
网友评论