Securing SSH No root connection over SSH - zacharylongo/Tech-Journals GitHub Wiki

STEPS ON HOW TO DISABLE SSH FOR ROOT/ANY OTHER USER


  1. Add a new user
  2. As a root/admin perm user input the command "visudo"
  3. Navigate to the line below "%wheel ALL=(ALL) ALL
  4. Press I to insert and write "(user) ALL=(ALL) ALL"
  5. Press escape and then colon, followed by "wq!" to write quit and return to home.
  6. Use command "su (user)" to log into new user
  7. Type out "vi /etc/ssh/sshd_config"
  8. Navigate down to "PermitRootLogin" and change "yes" to "no"
  9. Repeat step 5
  10. Type "servce sshd restart"
  11. DONE