SSH key pairs are two cryptographically secure keys that can be used to authenticate a client to an SSH server. Each key pair consists of a public key and a private key. Although passwords are sent to the server in a secure manner, they are generally not complex or long enough to be resistant to repeated, persistent attackers. Modern processing power combined with automated scripts make brute forcing a password-protected account very possible. Although there are other methods of adding additional security, SSH keys still is a reliable and secure alternative.
Creating an SSH key on Linux
First, open the terminal (command line) app, then run the following command to generate a 4096 bit SSH key:
- Login into your virtual machine via VNC or PuTTY or via SSH.
- Insert into the command line the following command:
ssh-keygen -b 4096
The command will output the following result and prompt you to save the newly created key. - In order to view the generated SSH-key, input the following command:
cat .ssh/id_rsa.pub
PuTTY is a popular SSH client for Windows. You can use it to remotely connect to a Linux server. Its companion software, PuTTYgen, can be used to create SSH keys.
First, download the PuTTYgen software, which we will use to generate the key.
Next, run the software and select RSA as the key type, enter 4096 as the number of bits to generate, and then click the GENERATE button.
Click the Save private key button and select a secure location to keep it. You can name your key whatever you’d like, and the extension .ppk will be automatically added.
Insert your SSH key into VM-manager panel.
At first, please login into your HOSTRY member area. Then access your VM-manager account:
Then go the SSH Keys section. Click on the SSH keys Add icon
Insert your public key into the text box and give it a name, then click on a Save button:
Done. The public key is added!