Let's look at how to create an SSH key, what it is used for and what services it is needed for.
What SSH key is used for?
SSH (Secure Shell Protocol) is a protocol for secure access to remote systems. It belongs to the applied ones along with the following: http, smtp, snmp, FTP, Telnet etc. The protocol operates on port 22; when configuring the ssh protocol, the port can be changed.
Compared to the Telnet protocol, ssh transmits encrypted traffic that is protected by an encryption key.
The protocol uses encryption keys to operate and transmit data in encrypted form. Thanks to encryption, an attacker who intercepts a stream of encrypted data will need several years to decrypt it, thereby losing the time the data is up to date, which is why asymmetric encryption is used.
Asymmetric encryption is the use of two keys to encrypt and decrypt data.
An SSH key is a sequence of arbitrary characters. Using it, the data is encrypted and after encryption it is sent to the end node.
Public key – this key encrypts data, it can be transferred to another party who must send encrypted messages/data.
Private key – this key decrypts the data and must be stored in a safe place. It is possible to encrypt a private key by using a passphrase when creating the key.
How to create an SSH key
You can create an SSH key through the Serverspace control panel.
To do this, go to the user settings, then to the SSH keys tab, as shown in the screenshot.
Here you can add a key or view existing ones.
If you want to add an SSH key, click on the Add SSH key button, after which a menu will open:
In the menu you can add an existing key or generate a new one. To create a new one, specify the name of the key, its format, then click the Create and download button.
After this, your key will be successfully created.
The created key can be used during server configuration. In the Access preferences, select the SSH keys option, then check the box which key to use: