I can ssh into remote_box and when I am in remote_box my userid is dorelal and I am at /home/dorelal. I have only one entry in my .ssh/authorized_keys and that is my id_rsa.pub .

There is an account for user 'deploy'. User deploy already has a .ssh directory and has a authorized_keys file.

I want to login to remote_box as 'deploy'. In order to do that this is what I did.

/home/deploy/.ssh/authorized_keys << /home/dorelal/.ssh/authorized_keys

However when I try deploy@remote_box I am getting Permission denied (publickey,gssapi-with-mic).

What am I missing?

link|improve this question
feedback

2 Answers

up vote 4 down vote accepted

You have to put the public key of dorelal to authorized_keys of deploy. The public key is placed in a .pub file in the .ssh directory of dorelal.

cat /home/dorelal/.ssh/id_rsa.pub >> /home/deploy/.ssh/authorized_keys
link|improve this answer
there were some weird white space issue. got resolved. it is working. thanks – user36318 Jul 14 '10 at 14:09
feedback

Likely, you've got incorrect permissions. Check your secure log (/var/log/secure on many systems) to be sure. If you need to correct them, just do:

chown -R deploy. /home/deploy/.ssh
chmod 700 /home/deploy/.ssh
chmod 600 /home/deploy/.ssh/authorized_keys
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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