agent admitted failure to sign using the key 解决方法

本文介绍了当配置了SSH无密码登录后仍然遇到'agent admitted failure to sign using the key'错误的原因及解决方法。通过使用ssh-add命令添加私钥可以轻松解决此问题。

在按要求配置好ssh无密码登录之后,还是出现了

"agent admitted failure to sign using the key" 的错误。

解决方法:

ssh-add ~/.ssh/id_rsa

用ssh-add命令添加私钥即可解决。

测试 SSH 基础连接 # 使用相同参数测试连接 ssh -v -p [端口] -i ~/.ssh/id_rsa [用户名]@[服务器IP] 观察 debug1: Authentications that can continue 后的错误提示: debug1: load_hostkeys: fopen /Users/jolinjiang/.ssh/known_hosts: No such file or directory debug1: load_hostkeys: fopen /Users/jolinjiang/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: checking without port identifier debug1: load_hostkeys: fopen /Users/jolinjiang/.ssh/known_hosts: No such file or directory debug1: load_hostkeys: fopen /Users/jolinjiang/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: hostkeys_find_by_key_hostfile: hostkeys file /Users/jolinjiang/.ssh/known_hosts does not exist debug1: hostkeys_find_by_key_hostfile: hostkeys file /Users/jolinjiang/.ssh/known_hosts2 does not exist debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist The authenticity of host '[fox-telemarket.starklotus.com]:36000 ([149.129.235.174]:36000)' can't be established. ED25519 key fingerprint is SHA256:/g3xmRHaPBpl4W5WUIcgHNyzPKjt5gCadvKC/8hlTZY. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '[fox-telemarket.starklotus.com]:36000' (ED25519) to the list of known hosts. debug1: rekey out after 4294967296 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 4294967296 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_ext_info_client_parse: server-sig-algs=<rsa-sha2-256,rsa-sha2-512> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Next authentication method: publickey debug1: get_agent_identities: bound agent to hostkey debug1: get_agent_identities: agent returned 1 keys debug1: Will attempt key: /Users/jolinjiang/.ssh/id_rsa RSA SHA256:HnRtogpLB7+VvzDy1C4Z/8RX5duqmYaBju7QMAC70hA explicit agent debug1: Will attempt key: /Users/jolinjiang/.ssh/id_rsa RSA SHA256:HnRtogpLB7+VvzDy1C4Z/8RX5duqmYaBju7QMAC70hA explicit debug1: Offering public key: /Users/jolinjiang/.ssh/id_rsa RSA SHA256:HnRtogpLB7+VvzDy1C4Z/8RX5duqmYaBju7QMAC70hA explicit agent debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Offering public key: /Users/jolinjiang/.ssh/id_rsa RSA SHA256:HnRtogpLB7+VvzDy1C4Z/8RX5duqmYaBju7QMAC70hA explicit debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: No more authentication methods to try. jolinjiang@fox-telemarket.starklotus.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
最新发布
08-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值