6

I'm getting an error when using ssh, which tries to use keys from ssh-agent, but fails with this message (when running ssh -v):

debug1: get_agent_identities: ssh_fetch_identitylist: communication with agent failed

Full log

I can see both of my keys added to the agent when running ssh-add -l:

$ ssh-add -l
3072 SHA256:0i3sqR60WRsAOpFVJyw951NUDW01jkAWFB1na921Asd xxxxxx@somehost (RSA)
4096 SHA256:CG6njka821AOd82j1xGFkyiOjwG/yo921KAIOWm3t/4 xxxxxx@anotherhost (RSA)

The same error appears with no keys or one key inside the agent.

I'm running the fish shell on Archlinux, and also tried this under bash, but it doesn't seem to make a difference. The same setup was working for me on Ubuntu. There seem to be no questions about this exact issue, and I'm stuck with no clues.

Daste
  • 174
  • 1
  • 10
  • 2
    I believe this problem was caused by a bug in the newest version of OpenSSH (8.9p1-1). I rolled back to version 8.8p1-1 and it seems to have resolved the issue. I will check the a newer version once it's released, but for now I'm going to suggest rolling back if there are any unknown issues. – Daste Mar 15 '22 at 17:31
  • 1
    This question is not related to SO as it is not a programming question! – Klaus Mar 21 '22 at 11:21

1 Answers1

21

I found that this problem on my pc is caused by the windows default ssh client which stores my ssh key files. After upgrading to 8.9 with https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.9.0.0p1-Beta I solved this problem.

Andy Lu
  • 336
  • 2
  • 5
  • 1
    The problem for me indeed was that ssh 8.9p1 from Ubuntu 22.04 on WSL could not connect to the 8.0p1 version that shipped with Windows. By downloading and installing the newer version manually my issue was fixed. – JelteF Jun 21 '22 at 08:51
  • Awesome, thank you for sharing this. This is not just wsl related, if you go to Ubuntu 22 with Windows default SSH as of now it breaks as per OP, and the latest installer fixes the issue. I had to remove the built-in ssh and put the installed ssh onto the PATH, because installer does not do it automatically for some reason. – Andrew Savinykh Oct 19 '22 at 08:02
  • I finally stumbled upon this today. I just updated my windows using the .msi file and rebooted and it worked. It looks like it installed to `C:\Program Files\OpenSSH\ssh.exe` and updated the path to put that first. – Russ Schultz Sep 01 '23 at 15:43