解决 Agent admitted failure to sign using the key 问题 with ssh & repo

来源:互联网 发布:excel表格数据透视图 编辑:程序博客网 时间:2024/06/11 19:04
本文来自:

http://sakananote2.blogspot.com/2010/07/agent-admitted-failure-to-sign-using.html

 

 

之前如果建立 ssh 连接,
只要將公鑰複製到 ~/.ssh/authorized_keys 就可以利用金鑰登入
而不需要建立密碼.

現在的 ssh 使用同樣的方法會出現錯誤訊息

Agent admitted failure to sign using the key

解決方式 使用 ssh-add 指令將私鑰 加進來 (根据个人的密匙命名不同更改 id_rsa)

# ssh-add   ~/.ssh/id_rsa  




补充:问题原因可能是该私钥非本机生成而是从其他机器拷贝过来的,这样需要添加私钥解决此问题。

注意ssh登陆服务器用户名和上传密钥用户对应,更新repo为最新并更改权限

0 0