1

I have a development machine and a server. On my development machine I am logged in as akonsu, on the server I use user ubuntu.

On my development machine I have created an RSA key pair, and I have copied the public key to /home/ubuntu/.ssh/authorized_keys

Then on my development machine I created a pem file from my private key:

openssl rsa -in ~/.ssh/id_rsa -outform pem > test.pem

Now I am trying to SSH into the server:

ssh -i test.pem [email protected]

but it still asks for password. And I do not know why. Please help.

here is a partial output of the command when I start it with -vvv option:

debug1: Trying private key: test.pem
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA f0:45:ac:1b:2b:ef:87:ef:b5:1e:26:77:78:1b:33:1c
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password

1 Answer 1

0

for some reason the article that I followed on rackspace (http://www.rackspace.com/knowledge_center/article/configuring-basic-security-0) instructed to set 600 permissions on the public key on the server:

chmod 600 /home/ubuntu/.ssh/authorized_keys

this I guess was the problem. When I enabled read permissions for the owner it all worked:

ubuntu@myserver:~$ l -l .ssh/
total 12
drwx------ 2 ubuntu ubuntu 4096 Oct  1 18:47 ./
drwxr-xr-x 4 ubuntu ubuntu 4096 Oct  1 18:46 ../
---S--S--- 1 ubuntu ubuntu  398 Oct  1 18:45 authorized_keys
ubuntu@myserver:~$ chmod u+r .ssh/authorized_keys 
ubuntu@myserver:~$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .