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.

Possible Duplicate:
SSH key exchange is not working

In Server A: I did the following steps:

ssh-keygen –t rsa
cd /.ssh
cp id_rsa.pub authorized_keys

Then in Server B: I created the .ssh directory and uploaded the authorized_keys from Server A

I tried logging in from Server A to Server B but the system is still prompting me to enter password.

Can anyone advise? Below is the ouput i got when using the following command:

ssh -v -o PreferredAuthentications=publickey user@host

debug1: Next authentication method: publickey
debug1: Trying private key: /export/home/user/.ssh/identity
debug1: Trying public key: /export/home/user/.ssh/id_rsa
debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic,publicke
debug1: Trying private key: /export/home/user/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive).
share|improve this question

marked as duplicate by quanta, Iain, Ward, Scott Pack, Shane Madden Oct 11 '11 at 19:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

serverfault.com/questions/319010/…??? –  quanta Oct 11 '11 at 7:43

2 Answers 2

Check the permissions of the authorized_keys file on server B. It should be at most 644. Check the permissions on the .ssh directory they should be 700. Check the authorized_keys file is owned by the account tying to log in.

share|improve this answer
i check the permission is correct –  sdsd Oct 11 '11 at 8:45

try command

ssh-copy-id user@machine   

it should copy your key automatically.

share|improve this answer
i tried running this command and it says file not found –  sdsd Oct 11 '11 at 8:44
it means that your pub key not in .ssh/ folder –  RusAlex Oct 11 '11 at 9:00

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