- Create a new non-root user, follow the prompts:
# adduser <new-username> - Give sudo permissions to the new user:
# usermod -aG sudo <new-username> - Ensure that sudo is installed (
which sudo; if none, install it:apt install sudo) - Check groups for new user:
# groups <new-username> - Edit sshd_config settings:
# vim /etc/ssh/sshd_config - Under "Authentication", change
PermitRootLoginfrom yes to no:"PermitRootLogin no" - (Optional) Change "MaxAuthTries" to a lower value to limit login attempts for any user:
"MaxAuthTries 4" - Save the changes:
:wq(save and exit vim) - Restart the ssh daemon:
# systemctl restart sshd - Check the status of sshd:
# systemctl status sshd(it should say "active (running)") - Verify the new configuration: try logging in as the new user and then becoming root:
$ sudo su - - If the above works, try logging in as root again over SSH. Even with the correct password you should get 'access denied'
- DONE!
$ vim .vimrc
set wrap
set number
set colorcolumn=80
set tabstop=4
$ vim .bashrc
# uncomment for a colored prompt, if the terminal has the capability
force_color_prompt=yes