小编Ban*_*all的帖子

ssh-add:如何永久添加ssh密钥

我正在使用Ubuntu 12.04,每次重启机器时,ssh-add保存的密钥标识都不见了.

~$ ssh-add -l
The agent has no identities.
Run Code Online (Sandbox Code Playgroud)

我已经在我的.ssh/config文件中添加了"IdentityFile",就像下面指示的帖子一样,但它不起作用.

在Ubuntu上使用ssh-add永久添加私钥

我的.ssh/config文件如下所示:

Host github-user-1
    HostName github.com
    IdentityFile ~/.ssh/id_rsa.git.user-1
    User git
    IdentitiesOnly yes

Host github-user-2
    HostName github.com
    IdentityFile ~/.ssh/id_rsa.git.user-2
    User git
    IdentitiesOnly yes
Run Code Online (Sandbox Code Playgroud)

ssh github ssh-keys

14
推荐指数
0
解决办法
3808
查看次数

标签 统计

github ×1

ssh ×1

ssh-keys ×1