Adding second ssh key to droplet in digital ocean hosting


So I created my server droplet using a windows machine and using puttygen to generate my private and public ssh key.  Using this article HERE

Now all that went fine you can use google search or go onto their help support section to get more info on doing all that.  I had no issues with that.

I used server pilot to manage my droplet installation and install wordpress.

Now I want to use my Mac or Linux machine to log in with SSH without a password.

So I followed instructions to generate my Private and Public ssh key on my linux machine which this case is a MAC.

it generated an "id_rsa.pub" (as my public ssh key)
and a "id_rsa" private ssh key in the ~/.ssh/ directory in the mac.

now I read some support tickets people having to got thru loops to add this public key to their already existing droplet.

I added the public key to the digital ocean settings page.


I logged in with sftp client (I use cyberduck on windows machines) with the same old ssh key as before.  I copied my "id_rsa.pub" file from my mac to my windows machine using a usb drive or over the network.  I uploaded this file to my digital ocean droplet vps server and remember what folder you put it in because you are going to navigate to that path using putty terminal.

Then I connected to my server console from putty using my usual method with old ssh key that I originally had working from my Windows Machine.

Once on there I navigated to where that ssh key file was named id_rsa.pub
once on there you can use this command to append it to your public ssh keys.

cat id_rsa.pub >> ~/.ssh/authorized_keys
rm id_rsa.pub


after that I could log in without a password with from my mac or linux machine using
the "root@your-ip-address" make sure you use the user root and be careful if you don't know what you are doing.


Well I am not in anyway any expert on this.  There are commands that you can probably use better or shorter then what I used but this is what worked for me.

Feel free to use your own.

Thanks

Advertiser