By SwissCheese
Hi people
I hope someone can help me
I created a sudo user after that i made keys for that user all workes fine with that user then i set in ssh_config to PermitRootLogin no and i think i did that when i loged in a root… i have the feeling i locked myself out from the server
now the problem is i cant login as root anymore…but i need that to change some stuff around.
Be careful im a Newbie to all this :-)
Anyway I hope some points me in a right direction
Thanks
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!
A few tips when creating a new user on a fresh droplet. Do these commands when logged in as root:
useradd -m -G sudo newuser (the group sudo depends on your distribution)
passwd root
passwd newuser
chsh -s /bin/bash (changes the log in console)*
mkdir /home/newuser/.ssh && cp /root/.ssh/authorized_keys /home/newuser/.ssh/ (this is if you used the ssh key to create the droplet)*
Now just remove login as root, relog and the new user and you should be fine :)
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.