Root Password Not Working Unable to Log into VPS to give user root right

September 4, 2013 14.7k views
I am going through this tutorial I keep on getting "permission denied" when I try to ssh into my root ip address. I am as far in the tutorial to cap deploy:setup when I do this I am getting this judy is not in the sudoers file. This incident will be reported. ** [out ::] command finished in 3716ms failed: "sh -c 'sudo -p '\\''sudo password: '\\'' ln -nfs /home/judy/apps/lintong/current/config/nginx.conf /etc/nginx/sites-enabled/lintong'" on I need to ssh into my root vps inorder to give my user 'judy' sudo right so I can deploy.... I am using the password emailed to me but keep on getting 'permission denied'. how do I recover this password to make sure its the same password? I asked this question on stackoverflow and suspects that the visudo section on the tutorial is incorrect?
1 comment
  • It was the same with me . That's why you pulled root access. try using The Following command , subistitua the " root @ " For Their user ' yourusername @ " :
    ssh your

10 Answers
please note that I can ssh into my judy@ip address no problem with password created as given per the instructions on the tutorial
Go to the control panel of your droplet and select "Access -> Reset Root Password". As the page says "This will shut down your droplet and a new root password will be set and emailed to you."
Then ssh to root@ip with the new password.

And don't forget to change it right away, as passwords sent via email cannot be considered to be secure.

Hoe this helps!
Hi I do see the reset root password option, but since its says it will shut down my droplet and then send me a new one, will I lose my work on my vps? (all the ruby/rails/git/dependencies/nodejs/nginx installations?)
You will not lose any work if you power off your droplet.
I got a new password but I still can't access my vps with root@ipaddress it keeps on saying Permission denied (publickey,password). any ideas on how I can troubleshoot this ?
Did you disable root access or edit /etc/ssh/sshd_config?

If @judy.ngai1228 followed the tutorial referenced in the OP, then, yes, root access is disabled.

@judy.ngai1228, when you edited /etc/ssh/sshd_config, did you execute visudo and add judy ALL=(ALL:ALL) ALL under the # User privilege specification?

Also, make sure that you added AllowUsers judy to the bottom of /etc/ssh/sshd_config.
I needed to add the root user to the AllowUsers line along with the others to be able to ssh into the server as root. Dont know if this is the right way, but it works.
"I needed to add the root user to the AllowUsers line along with the others to be able to ssh into the server as root"
I just went through the same process. The root password was accepted using the droplet access panel but not using putty. Was working ok yesterday but not today but at least able to use root again
  • Hmm, I put root user with the others under AllowUsers and I also changed "AllowRootLogin no" to "AllowRootLogin yes". I enter the password sent by DigitalOcean, but it appears that the connection closes instantly.

    Any suggestions of how to login as root?

Have another answer? Share your knowledge.