0

It's been a while since I've done this and configured ssh keys.

I generated an ssh key with a different file name than id_rsa

I have a DigitalOcean Droplet where I placed a named ssh key pair on creation.

Then I created a ~/.ssh/config on my local machine where I configured my Host to use the proper identity file.

I made my hostname the IP of the droplet. I believe I can do that.

~/.ssh/config:

Host multipress
 Hostname XX.XXX.XXX.XXX
 User root
 IdentityFile  ~/.ssh/multipress

But when I try to connect it fails:

% ssh root@XX.XXX.XXX.XXX                                                                                                                                                                                                                             
   root@XX.XXX.XXX.XXX: Permission denied (publickey).
Kyle Calica-St
  • 103
  • 1
  • 6
  • 1
    You only need to add the public key in the digital ocean website interface and not the key pair. Please post the output of ssh -v root@XX.XXX.XXX.XXX to check the actual error message – Ravi Kumar CH Oct 08 '21 at 11:03
  • @RaviKumarCH that's a helpful command. I did solve it. My host file on local needs IdentityFile! – Kyle Calica-St Oct 08 '21 at 20:05

1 Answers1

0

I was able to make this work. I think the droplet just needed some time.

Kyle Calica-St
  • 103
  • 1
  • 6