OpenSSH is a freely available version of the Secure Shell (SSH) protocol family of tools for remotely controlling, or transferring files between, computers.
apt-get install openssh-server
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
sudo chmod a-w /etc/ssh/sshd_config.original
The following are examples of configuration directives you may change:
To set your OpenSSH to listen on TCP port 2222 instead of the default TCP port 22, change the Port directive as such:
To have sshd allow public key-based login credentials, simply add or modify the line:
If the line is already present, then ensure it is not commented out.
To make your OpenSSH server display the contents of the /etc/issue.net file as a pre-login banner, simply add or modify the line:
In the /etc/ssh/sshd_config file.
sudo service ssh restart