Securing Linux SSH
$ sudo vi /etc/ssh/sshd_config
# Run ssh on a non-standard port:
Port 2345 # Change the port as you want
# Disable protocol 1
# Protocol 2,1
Protocol 2
# Prevent root logins:
PermitRootLogin no
# Limit user logins:
AllowUsers alice bob
# Disable password authentication forcing use of keys
PasswordAuthentication no
How to generate your own private key
$ ssh-keygen -t rsa
Written on November 11, 2016