Unable to login on droplet using ssh (terminal from mac)

January 21, 2019 436 views
Applications Debian

Unable to login on droplet using ssh (terminal from mac). I have added public key in .ssh/authorized_keys file and trying to connect. While connecting through ssh "ssh root@xxx.xx.xx.xx" Its asking for root password. Root password is already disabled. From windows putty we are able to login with private key without using any password.
Do help me out.


2 Answers

If you are 100% sure that is the same private Key on your Mac as on your Windows machine then make sure that the on Mac is has 0400 permissions applied.

Just do a "chmod 0400 id_rsa", this should work.
If this doesn't help then maybe you can provide the error message that you're getting.

No, both keys are not same.
I have generated new public private pair for mac. and Added public entry in authorized_keys on the server.
its just giving this error: "Permission denied (publickey)."


Have another answer? Share your knowledge.