Can't log in with ssh keys
I followed this tutorial and did this many times:
[url=http://blog.servint.net/2012/05/11/the-tech-bench-ssl-key-authentication/]Server Security and SSH Key Authentication
The public key correct imports into WHM root key and Manage Authorization is set to authorized.
But when I ssh -p {customport} user@mydomain.com I always get this error:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
As soon as I allow password authentication, the SSH works but asks me for my password and doesn't use the key.
Any ideas?
-
try using the -i flag (identity) when you log in, ie: ssh -i your_private.key -p {customport} user@mydomain.com 0 -
[quote="quizknows, post: 1692782">try using the -i flag (identity) when you log in, ie: ssh -i your_private.key -p {customport} user@mydomain.com
That didn't seem to work either. :( At one point I disabled root ssh access and forced users to ssh as a different user then su - to get root access. But checking the sshd_config, I see that PermitRootLogin yes. Any other suggestions? [COLOR="silver">- - - Updated - - - Ah.. so it look like when I ssh with root@hostname.com, I get an access denied. So apparently I am not able to ssh as root. I would imaging that might be my problem as to why I can't ssh with a keypair.0 -
Alright.. it turns out that in my sshd_config file, I had the following: AllowUsers kershnerd,root Removing that line and forcing password authentication to off now works! Thanks for looking into this! 0 -
Hello :) I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
4 comments