Can't access droplet, lost key of root, now ssh-copy-id not working Permission denied (publickey)

Posted January 13, 2020 886 views
DigitalOceanLinux CommandsUbuntu 18.04

I have lost root passphrase of an ssh key
now trying to set new key after changing root password from console

Also tried to copy in the console but it copy paste don’t work !!!

ssh-copy-id root@ipaddress
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/Users/jk/.ssh/”

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed – if you are prompted now it is to install the new keys

permission denied (publickey).

edited by bobbyiliev

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer


I would recommend following the steps from the official documentation on how to recover from Lost SSH Keys:

Hope that this helps!

Submit an Answer