OpenSSH sshd
Edit /etc/ssh/sshd_config and check the following settings:
-
# SSH service
Port 22
Protocol 2
-
# Disable root login
PermitRootLogin no
-
# If password login not allowed
AuthenticationMethods publickey
PasswordAuthentication no
-
# If password login allowed
AuthenticationMethods publickey,password
PasswordAuthentication yes
-
# No empty passwords for login
PermitEmptyPasswords no
-
# Banner text
Banner [message here]
Then restart ssh service for these settings to take in effect.
References:
- https://manpages.ubuntu.com/manpages/xenial/en/man5/sshd_config.5.html