Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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
share|improve this answer
    
there were some weird white space issue. got resolved. it is working. thanks –  user36318 Jul 14 '10 at 14:09

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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