I’m locked out of my VPS droplet. How can I create a new identity, so I’m able to log in? I don’t recall ever creating a root password
OS: El Capitan 10.11.6 Distribution: Ubuntu 14.04
I used to ssh into my VPS. I have an
id_rsa and a
id_rsa.pub . I’m trying to access it now using:
Result > “Permission denied, please try again” (3 incorrect entries and then…) > "Permission denied, (publickey,password)
I don’t remember using a password in the past, thats why I configured ssh. Even if I did, what action can I take to “reset” my login password? I’ve tried generating new ssh keys, added them to my known_hosts with
ssh-add. I’ve added the new ssh key to my VPS through the web interface.
Can anyone walk me through the proper process of resetting my login?
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
Sorry to hear you had bunch of problems. Anyways I will write few sentences for you (if you didn’t already destroyed Droplet) and for future readers.
First of all, you can try using
ssh-copy-idfrom your local machine instead of
ssh-add. Step Four of Initial Server Setup Tutorial have it explained great.
Make sure that you have
/home/sammy/.sshon local machine.
Before using SSH as
rootmake sure you didn’t set
/etc/ssh/sshd_configwith any text editor from DigitalOcean Web Console if you can’t access SSH:
PermitRootLogin. Make sure it’s set to
yesand there is no any
#(comment) before line. If you want to use password for login, make sure
PasswordAuthenticationis set to
yesand there is also no
Save file, exit editor and restart SSH:
You can also for debugging create new user, add it to
sudogroup and use it for SSH instead of DigitalOcean Web Console. Initial Sever Setup has it covered in Step One in Step Two. In case you want to use that user with password instead of SSH key, make sure you have enabled
sshd_config(I wrote in previous step how to check it`.
I was able to log in using the digitalocean web console. I logged in as root, but I still cannot ssh into my server from my OS (terminal).
Steps I took to reset root password:
[username] login: _(Here I entered root as my login)
password: _(I entered the password emailed to me, I typed it out didn’t try pasting)
So I’m able to access my server using that process - but doesn’t entirely solve my problem. I’m still being asked for a password when I try to ssh in from my OS terminal. And my new password ONLY works in the web console, it does not work when I’m asked for a password from my OS. I’m not sure whats going on, I’m almost tempted to destroy my droplet, lose all my work and start fresh. Already lost an entire day over this. Hopefully the above atleast gets someone else access to their VPS.