Just created a new virtual Ubuntu server and I'm in the process of hardening it for production use. I currently have a root account. I want to do the following:
- Create a new user (let's call them
jim
for the rest of this). I want them to have a/home/
directory. - Give
jim
SSH access. - Allow
jim
tosu
to root but not performsudo
operations. - Turn off root SSH access.
- Move SSHd off to a non-standard port to help stop brute-attacks.
My problem lies with the first two items. I've already found useradd
but for some reason, I can't log in as a user created with it over SSH. Do I need to beat SSHd to allow this?
/etc/nologin
file but it's empty. I deleted it and restarted ssh but it's still just respondingPermission denied, please try again.
when I try and log in.