-   Linux - Newbie (
-   -   ssh passphrase question (

deep27ak 02-16-2012 12:16 AM

ssh passphrase question
OS : RHEL 5.2
I generated a RSA key using

#ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/
The key fingerprint is:

And copied the key to hosts /root/.ssh/authorized_keys

but now when I try to ssh it still prompts me for the passphrase but I don't want it to ask any password or passphrase. As soon as I do ssh, the machine should connect to remote host.

Am I missing something?

chrism01 02-16-2012 12:38 AM

Did you give it a passphrase or just <Enter> at the prompt?

deep27ak 02-16-2012 12:50 AM

No, I have supplied a passphrase to it

Am I suppose to give a blank passphrase i.e just "enter"?

chrism01 02-16-2012 12:57 AM

Exactly; passphrase should be just <Enter> if you DON'T want one eg want to be able to automate cxns.
Passphrase is basically a passwd to access the relevant auth-key: its optional

suicidaleggroll 02-16-2012 01:04 AM

And if that doesn't work, it's possible the permissions on the authorized_keys file are jacked:


chmod 750 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

If the permissions aren't right, ssh won't use the file.

deep27ak 02-16-2012 01:10 AM

Thanks chrism01

That did the trick :)

True enough suicidaleggroll
But if it is prompting me for passphrase then it surely means that ssh is able to read the authorized_keys file.
If it would have been a permission issue it wouldn't have prompted me for passphrase in the first case but yes it plays its part for not allowing any other users to make any change in this file.

All times are GMT -5. The time now is 12:31 AM.