By kukulcanwar
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!
Hi @kukulcanwar,
The eaisiest thing to do is, enter your DigitalOcean Droplet Console and from there add your new SSH KEY to the
~/.ssh/authorized_keys
file, OR enable PasswordAuthentication from the sshd_config file located in
/etc/ssh/sshd_config
Once you edit the file don’t forger to restart your sshd service
service sshd restart
Regards, KFSys
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_configPasswordAuthentication from “no” to “yes” and save the filesudo nano ~/.ssh/authorized_keyssudo nano /etc/ssh/sshd_configPasswordAuthentication from “yes” to “no” and save the fileHope that this helps! Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.