I currently have three AWS instances (all running Ubuntu 14.04 LTS) - as well as the default "ubuntu" user created by AWS, I set up another admin user and use a public key specifically for that user from my laptop (Ubuntu 16.04 LTS). So far so good - never had a problem.

Now, I've just created a new instance with 16.04 LTS. I ended up having to cut a new key pair for the ubuntu user when setting up the server as the original pair used for the other didn't seem to work.

I've created a new user on the new instance and have been trying to get publickey authentication working here, too. I can log in as the new user after connecting as the ubuntu user and using the su command.

I keep getting the following when trying to connect as this user from my laptop:

debug1: Offering RSA public key: /home/horuskol/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.

Note - this is the same certificate I'm using for the other three servers and still don't have a problem there

I've checked permissions on the remote server:

/home/horuskol                           horuskol    horuskol    drwxr-xr-x
/home/horuskol/.ssh                      horuskol    horuskol    drwx------
/home/horuskol/.ssh/authorized_keys      horuskol    horuskol    -rw-------

I triple checked that the authorized key on the remote server matched the local public key.

I've even copied the authorized_keys file across from one of the working servers.

Eventually, I created a new public/private key (id_rsa_2017_01) and copied the new public key to the new server.

Nothing has worked so far.

  • should the authorized_keys file not be in the .ssh directory?
    – Kees Beets
    Jan 8, 2017 at 8:17
  • typo in the question - authorized_keys is in the right place
    – HorusKol
    Jan 8, 2017 at 9:07
  • 1
    What do you see in the server log. Is there anything if you set LogLevel DEBUG3 and restart the sshd service?
    – Jakuje
    Jan 8, 2017 at 11:14

1 Answer 1


Thanks to Jakuje who pointed me in the direction by providing details on how to change the LogLevel for sshd

It also helped to return to this after a sleep...

debug1: Could not open authorized keys '/home/horuskol/.ssh/authorized_keys': No such file or directory

Because I'd named the file authorized-keys.

Fixing the filename and everything is all good now.

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.