美文网首页
Linux ssh 多钥匙对的使用

Linux ssh 多钥匙对的使用

作者: 暴风鱼 | 来源:发表于2017-11-12 15:02 被阅读34次
多个ssh钥匙对

我有多个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

相关文章

网友评论

      本文标题:Linux ssh 多钥匙对的使用

      本文链接:https://www.haomeiwen.com/subject/pfanmxtx.html