Question

Cannot login with pubkey

Posted September 27, 2018 369 views
CentOSApache

Here are steps what i did for ssh key connection:

generated ssh key, the i checked /User/admin/.ssh/ here i have idrsa, idrsa.pub and known_hosts.
I copied idrsa.pub to ~/.ssh/authorizedkeys - (I triple checked taht they are the same) (btw i used ssh root@ip)
then i tried to connect to ssh root@ip again. but it doesnt accept the key(password auth method worked after pubkey fail). Ubuntu 18.04.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Try: ssh -vvv -i /User/admin/.ssh/idrsa root@ip

The verbose output will say whether the key matched the pub on the other end.

Submit an Answer