Securing SSH No root connection over SSH - zacharylongo/Tech-Journals GitHub Wiki
STEPS ON HOW TO DISABLE SSH FOR ROOT/ANY OTHER USER
- Add a new user
- As a root/admin perm user input the command "visudo"
- Navigate to the line below "%wheel ALL=(ALL) ALL
- Press I to insert and write "(user) ALL=(ALL) ALL"
- Press escape and then colon, followed by "wq!" to write quit and return to home.
- Use command "su (user)" to log into new user
- Type out "vi /etc/ssh/sshd_config"
- Navigate down to "PermitRootLogin" and change "yes" to "no"
- Repeat step 5
- Type "servce sshd restart"
- DONE