我在使用 ssh 时遇到错误,它尝试使用 ssh-agent 中的密钥,但失败并显示此消息(运行时ssh -v):
debug1: get_agent_identities: ssh_fetch_identitylist: communication with agent failed
Run Code Online (Sandbox Code Playgroud)
运行时我可以看到我的两个密钥都添加到代理中ssh-add -l:
$ ssh-add -l
3072 SHA256:0i3sqR60WRsAOpFVJyw951NUDW01jkAWFB1na921Asd xxxxxx@somehost (RSA)
4096 SHA256:CG6njka821AOd82j1xGFkyiOjwG/yo921KAIOWm3t/4 xxxxxx@anotherhost (RSA)
Run Code Online (Sandbox Code Playgroud)
如果代理内没有密钥或只有一把密钥,也会出现相同的错误。
我在 Archlinux 上运行 Fish shell,也在 bash 下尝试过这个,但似乎没有什么区别。同样的设置在 Ubuntu 上也适用于我。对于这个确切的问题似乎没有任何疑问,我也没有任何线索。