How to setup an SSH server on Ubuntu
DIFFICULTY strong> | Basic - 1 | Medium - 2 | Advanced - 3 td> |
TIME REQUIRED strong> | 5 min |
RELATED PRODUCTS strong> | Linux-based VPS or dedicated servers |
Here is a quick tutorial on how to how to set up an ssh server on Ubuntu.
Install ssh
Run the following command from a terminal window to install ssh with apt while using superuser privileges:
Press 'Y' when prompted to authorize the use of the indicated storage space for the installation.
Test the ssh installation
Ensure that ssh is working by connecting to your own computer with the following command:
The error message that reads "The authenticity of host 'localhost (127.0.0.2)' can't be established" means that the ssh client doesn't have the server's encryption key yet. Enter "yes" to continue the login process and enter your password when prompted. If the logon is successful, the ssh client will store the server's encryption key in the local file named ~/.ssh/known_hosts.
Enter exit to return to the local command shell. Enter ssh localhost to sign on to your computer again. Note that the ssh client now has the server's encryption key.