I am unable to make rsa key pair authentication work on my CentOS 6.2 vps. My understanding is that if rsa authentication is properly configured no password will be requested yet it is still required in my case. I am on a windows machine and use PuTTY as my SSH client. Here is what I have done so far:

Created SSH-2 RSA keys using PuTTYgen

Created directory ~/.ssh

Copied the public key to ~/.ssh/authorized_keys, looks like this with no returns:

rsa-ssh AAAAB3NzaC1yc2EAAAABJQAAAIEAm+xgm1hVU5u5CqPTwxg0/VnPMxjQKnCGjdyD
KxcvsAs= bizidge_one key

Set permissions:

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

Loaded my private key in Pageant (the PuTTY authentication agent)

When I first had problems I tried the following based on the 'Known Issues' section of the release notes:

restorecon -R -v ~/.ssh

I also tried restarting SSHD

I really appreciate any help. I am new to this and have been stuck for a while now. I suspect the problem is something rather obvious to those who have a bit of experience.

2 Answers 2


Oops. At the beginning of the key 'rsa-ssh' should have been 'ssh-rsa'. Got it fixed.


I also found today that some hosting providers disable the sshd options to make this work.

I had to edit /etc/ssh/sshd_config and then uncomment these lines:

PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys

Then I restarted sshd:

service sshd restart

I also confirmed that getting the permissions on the .ssh directory and authorized_keys file (as noted above) is critical.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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