VPS i serwery dedykowane (Centrum kontroli hostingu) Pomoc

How to setup an SSH server on Ubuntu

The SSH network protocol allows users to perform remote operations over a secure connection between two computers on a network. Common uses of SSH include command-line logins, command executions and data communications. The host computer must have an SSH server installed so that it can accept an SSH connection from a client computer. OpenSSH is the most popular software that implements SSH for Linux operating systems such as Ubuntu. Setting up an SSH server on an Ubuntu computer primarily consists of installing OpenSSH and ensuring that an SSH client can connect to the server.
DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
TIME REQUIRED 5 min
RELATED PRODUCTS 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:

# sudo apt-get install ssh

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:

$ ssh localhost

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.


Czy ten artykuł był pomocny?
Dziękujemy za przekazanie informacji. Aby porozmawiać z pracownikiem obsługi klienta, zadzwoń pod numer pomocy technicznej lub skorzystaj z opcji czatu (powyżej).
Cieszymy się, że udało się nam pomóc! Czy coś jeszcze możemy dla Ciebie zrobić?
Przykro nam z tego powodu. Powiedz nam, co było niezrozumiałe lub dlaczego nie udało się rozwiązać Twojego problemu.