This is definetly a duplicate but I went through as many of the other answers as I could, I posted on the Digital ocean forum first, and I contacted DO support, and still I cannot access my server.
I tried:
- Used
ssh-keygenand make a key called id_rsa3 (id_rsa works, but this is already taken). Adding the SSH key on creation to the DO dashboard via copy/paste. This method did not work. I destroyed the droplet and began again. - Recreated new keys and did
ssh-copy-id -i ~/.ssh/id_rsa3 root@MY-IP. Then didssh -v -i ~/.ssh/id_rsa3 root@MY-IPto test.Permission denied (publickey).I destroyed the droplet and began again. - Recreated new keys. Login into DO console and go to
/etc/ssh/authorized_keysand paste in the public key that matches my local key. Thenssh -v -i ~/.ssh/id_rsa3 root@MY-IPto test. Still,Permission denied (publickey).Destroy droplet, try again. Created a
~/.ssh/configand tried to get the droplet to choose the correct key. Might be some syntax problems here. It runs the config, but does not get the correct key.Host sinatra_app HostName 206.***.***.*04 AddKeysToAgent yes UseKeychain yes User root PubKeyAuthentication yes IdentityFile ~/.ssh/id_rsa3 IdentitiesOnly yes
UPDATE:Destroyed droplet and added new keys. It asks me for a PW even with SSH. If I changed the PasswordAuthentication no it will then say Permission denied (publickey). So this is where I am stuck now. With access but cannot remove PW.