Server A thinks it is called foo.bar.com, but actually there's a problem (not in my control) with the DNS registration, so I connect to it at I want to be able to scp from there to server B using public key authentication. I did ssh-keygen, which created a public key ending in "myuser@foo.bar.com" (and installed it in authorized_keys at the far end).

Problem: this public key isn't accepted, perhaps due to a problem with reverse lookup. (I'm reading between the lines here:

debug1: Trying private key: /home/rmmf/.ssh/identity
debug3: no such identity: /home/rmmf/.ssh/identity
debug1: Offering public key: /home/rmmf/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 368 bytes for a total of 1477
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password


Is a working DNS entry a prerequisite for pubkey authentication? Do I need to set this up differently? How can I find out if this is actually the problem?

  • What kind of "DNS Problem"? Try to post your connection string also – Mathias R. Jessen Feb 1 '12 at 7:25

Answering your question, DNS entry is not a prerequisite.

Did you add the content of your private key file on the /home/[your_user]/.ssh/authorized_keys file?

This file works like the locker to which your public key will be matched.

also, set this file permissions to 400 (chmod 400 /home/[your_user]/.ssh/authorized_keys) and be sure that it's owned by your user (chown [your_user] /home/[your_user]/.ssh/authorized_keys )

  • Thanks - I had done each of these things, except 600 instead of 400. – Steve Bennett Feb 1 '12 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.