adduser usrer1assign a passwd to user1. and then add it to sudoers. But first need to install sudo:
apt-get install sudoadd this line inside to
nano /etc/sudoers
user1 ALL=(ALL) ALL
Open the file up while logged on as root.
nano /etc/ssh/sshd_configFind this section in the file, containing the line with “PermitRootLogin” in it.
#LoginGraceTime 2mMake the line look like this to disable logging in through ssh as root.
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
PermitRootLogin noNow you’ll need to restart the sshd service:
/etc/init.d/ssh restartNow nobody can brute force your root login, at least.
Source: How-to Geek
No comments:
Post a Comment