Ssh – How to set public SSH key for root user on server

sshssh-keys

I'm trying to follow Slicehost Document to setup my server.
I reached SSH section. I made it as written, but when i logged out from root, i cant access root@IP_ADDRESS -p 30000 again! but i can access user@IP_ADDRESS -p 30000.

So, the question is, how to set a public SSH key for root user?

Best Answer

I'm not sure what you mean. You mean you can't login as root with your public_key? If so check /root/.ssh/authorized_keys

Have also look at /etc/ssh/sshd_config It should contain:

PermitRootLogin yes