How do I login with ssh keys on mac?

November 11, 2015 8.6k views
Logging Applications

I currently don’t have access to my PC…
I have Auth keys setup on my server but don’t know how to access it through mac because I don’t think terminal allow ssh keys and any programs to login to sftp for mac with ssh keys?

2 Answers

@JustinManager - You should be able to run ssh -i [key] root@[serverip] just as you would if you were using PuTTy or an alternative. Of course, you will need your key as once you set an SSH key up for a droplet, you’re not able to recover the root password from DO’s control panel.

  • But don’t I have to put .ppk file in since I’m using ssh keys when I login?

    • @JustinManager - Outside of PuTTy, or a program that uses PuTTy’s PPK format (WinSCP, FileZilla etc), you would use the basic ssh command referenced above. If you’re using a PPK file, you would need to convert it back to OpenSSH format as the ssh command won’t accept a PPK from the CLI.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!