I have forgot user password but remmeber root password who have no ssh access permission?

February 12, 2014 4.8k views
Hello, I have forgot user password. I have the root password with no ssh access. nano /etc/ssh/sshd_config PermitRootLogin no UseDNS no AllowUsers user I do have firewall that I think not allowing me to access console. What should you suggest me? Thank you in advance.
6 Answers
Have you disabled root login yet??

if you did then what about permissions to SFTP to both user and root?

You still can login to your control panel at DO console and login there as root if you didn't block root user yet. Then delete the user and add the user again....

Root login is disabled and tried PSFTP getting connection refused error. DO console is giving this error Failed to establish a connection to the console. Please reload. might be because of firewall. Is there any thing else can be done to edit sshd_config?

Thank you for your time and reply.
How about a backup?? did you make any backup or snapshot after you set things nicely??

how about the user you set up? does the user have any privilage to access SFTP or FTP and handle files??

because if the user can, then you just need to edit some file and you're done...
I have backup only. user was set these permissions ALL=(ALL:ALL) ALL
even if you gave this permission ALL=(ALL:ALL) ALL to the user, you still need to give more permissions to the user to write / read/ execute files and/ or folders.

I'm afraid you will have to restore your droplet to the point where your root login is enabled...!!!

you could try to login and try the pass for the user you forgot if you can...otherwise, the only choice is the one I have mentioned...
You can reset your droplet's root password in the 'Access' tab and then use the new password to log in to it using the Remote Console.
Have another answer? Share your knowledge.