Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 .

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
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/ >> /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


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.