解決Agent admitted failure to sign using the kye with ssh

之前如果建立 ssh 連接,只要將公匙複製到~/.ssh/authorized_keys就可以直接登錄而不需要建立密碼.

如果在使用時候出現如下信息:

Agent admitted failure to sign using the key

解決方式:

驗證產生的key時候已經加入到ssh中,使用ssh-add –l進行查看


如果沒有打印出如上信息,你必須將私匙添加到ssh中,通過ssh-add path/to/key

#ssh-add   ~/.ssh/id_rsa

例如:ssh-add  ~/.ssh/[email protected]  

 Note:

在大多數系統中,都回默認將 ~/.ssh/id_rsa,~/.ssh/id_dsa, ~/.ssh/identity自動添加到ssh中。如果你重新生成了新的key,那麼你必須使用使用 ssh-addpath/to/key手動添加。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章