I am revisiting my application on digitalocean but my keys were on a hard drive that just died. I tried using putty to initiate ssh and it asked me for my username, which I did not know so I went about changing the password inside digital ocean.
I was able to access the terminal inside digital ocean but it would not let me modify any files. I suppose I need to change permissions but since I lost root access, I am at a loss as to what to do.
Every time I try to enter either via git bash or putty, I get an error. In gitbash, Permission denied (publicKey)
. In Putty, Server refused your key
. I followed about 11 tutorials and no luck. I have the private key stored in my .ssh folder as private.ppk as well as my public key.
I copied the single line code into the interface provided by digitalocean and gave it a unique name. In putty, I pointed to the private key.
If anyone can help me with this I would greatly apprecate it. Thank you in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hello, @kukulcanwar
You can enable PasswordAuthentication for your Droplet by modifying your
/etc/ssh/sshd_config
file. Once set to Yes restart the SSH service and connect via an SSH client for a more stable connection. You can then modify your~/.ssh/authorized_keys
file to add the appropriate public key.This change can be made from the DigitalOcean’s console. If you’re having issues to access the console you can than reach to our amazing support team that can help you further with this.
To enable the
PasswordAuthentication
follow these steps:sudo nano /etc/ssh/sshd_config
PasswordAuthentication
from “no” to “yes” and save the filesudo nano ~/.ssh/authorized_keys
sudo nano /etc/ssh/sshd_config
PasswordAuthentication
from “yes” to “no” and save the fileHope that this helps! Regards, Alex
Hi @kukulcanwar,
The eaisiest thing to do is, enter your DigitalOcean Droplet Console and from there add your new SSH KEY to the
file, OR enable PasswordAuthentication from the sshd_config file located in
Once you edit the file don’t forger to restart your sshd service
Regards, KFSys