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
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.
Log in as your new user?
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 :)