Cannot login with pubkey

September 27, 2018 299 views
CentOS Apache

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.

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.

Have another answer? Share your knowledge.