ipogosov
3/20/2020 - 1:09 PM

Create a sudo user and disable root

[add new user in linux]

# Create a user
adduser $USERNAME
usermod -aG wheel $USERNAME
usermod -aG sudo $USERNAME

# Testing the user
su - $USERNAME

# Disable SSH Root login
# Uncomment (if it is commented) the directive PermitRootLogin and set its value to NO 
sudo mcedit /etc/ssh/sshd_config

# Restart SSDH to apply
sudo systemctl restart sshd 
# OR
sudo service sshd restart