1

I just created a set of SSH keys and used ssh-copy-id to copy it on to a remote server.

Upon trying to connect via ssh I got the error

sign_and_send_pubkey: signing failed: agent refused operation

Similarly, when trying to connect via MOSH I get asked for a passphrase even though these keys were made without a passphrase at all.

All of the permissions on my .ssh folder (and my home directory) were set to 700.

Looking at this answer led me to try

I think your ssh-agent isn't working ! Perform the following commands...

    eval ssh-agent -s 
    ssh-add

which immediately made the login work. The problem with this is that I do not want to always have to use ssh-agent, MOSH itself does not support SSH-Agent and so I am wondering if there is a way I can make my keys work without using ssh-agent. Can somebody explain to me if this is possible.

Note: The remote computer in this case is a Raspberry PI running Pidora.

4
  • ssh username@ipaddress Also, the other way, with mosh, was just by opening the chrome app and typing in the username and password
    – Startec
    Aug 23, 2016 at 20:58
  • For mosh there is only one way to upload a key, and only one at a time so yes it knows which key to use. The name of my key file, used in both, is just id_rsa
    – Startec
    Aug 23, 2016 at 21:03
  • your permissions might still be wrong e.g. some should be 644 see alex's answer here superuser.com/questions/215504/…
    – barlop
    Aug 23, 2016 at 23:20
  • I don't like ssh-agent either, and do not use it. I have the usual config file in ~/.ssh, with the keys associated to the hosts, and also the usual instruction IdentitiesOnly yes for all hosts. Of course, this means I have to type in the key password every time, which does not bother me. Aug 24, 2016 at 6:16

0

You must log in to answer this question.

Browse other questions tagged .