- Most of the automatic brute-force software starts with attacking SSH service on
22port and try to match a password for therootuser rootuser is not the only user under risk, brute-force software has abundant dictionaries of most common used user-names, so it's a good idea to create a user with some random-gibberish name, like:QBHZEEQXT
Edit /etc/ssh/sshd_config file:
# nano /etc/ssh/sshd_config
# Find line starting with "PermitRootLogin"
# change "yes" to "no":
PermitRootLogin no
# Save file with: "ctrl + o" combination
# Close file with: "ctrl + x" combinationAdd extra security layer, with limiting login only to a single user (optional):
# nano /etc/ssh/sshd_config
# Add new line, where [username]
# is the name of ONLY allowed to
# login over SSH user:
AllowUsers [username]
# Save file with: "ctrl + o" combination
# Close file with: "ctrl + x" combinationRestart SSH service:
service sshd restart