One of the Linux projects I'm working on requires a public key login via ssh.
Simple I thought and generated a key with
Then copied it over with
and tried to log in with the key. However, then I got this error message:
ssh error: agent admitted to failure to sign using the key
After endless googling I found out that it has something to do with ssh-agent.
This can be temporarily disabled by adding
SSH_AUTH_SOCK=0 ssh 192.168.1.2
in front of the ssh command and I'm able to log in. There's clearly something wrong with ssh-agent but this fixes the issue. I then started ssh-agent by hand on the server and client with ssh-agent bash and could then run ssh-add on the server to store the passphrase as well.