I am trying passwordless ssh connection using public and private key mechanism to a cloudserver(running redhat) in rackspace.
My commands are(in the server):
- adduser -g root
- mkdir /home//.ssh
- copy my public key to /home//.ssh/authorized_keys
- chmod 700 /home//.ssh
- chmod 600 /home//.ssh/authorized_keys
In the config file of server in the rackspace cloud:
- RSAAuthentication yes
- PubkeyAuthentication yes
- #AuthorizedKeysFile .ssh/authorized_keys
When I try to do "ssh -i my_priv_key @server_ip", it fails and asks me for the password of @server_ip.
When I added the following line to sshd_config on my server, it says Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Match User PasswordAuthentication no
I have been trying for the last couple of hours but am not able to figure it out. So any idea how to solve this problem.