SSH keys are a generated pair of long and practically impossible to break codes that allow automated user authentication. SSH key pairs work in two halves; the public key which acts like a lock, and the private key which can be used to open the lock. The public key can be safely passed to your cloud servers while the private key should be kept securely stored on your own computer.
The SSH key feature at your UpCloud Control Panel provides an easy public key management and allows you to apply the authentication method to any new server.
To add new keys to your list, go to the SSH Keys section under Servers menu. Click the New SSH key button at the top of the page to import a new key. This opens an empty SSH key editing window. Copy your public key to the SSH key text box, the name field is automatically filled with the key name, but you can also assign the name as you wish.
With the key set and named, click the Accept button at the bottom to save the changes. Each key you add to the control panel will appear on the SSH keys list. Keys can be edited or deleted on the list freely.
Applying keys at deployment
Public keys that are stored in the control panel can be directly applied to your cloud servers at deployment. Click the Show button at the SSH keys section and select the keys you wish to use on the new server.
You can also click the Add new button to import your keys right at the deployment without losing your server setup selections. This opens the key editing window, copy in your public key and click Accept.
The keys are added to the default root account and allow you to harden the server security right from the get go. If you wish to add SSH keys to other user accounts, check out the Initialization script feature to create new usernames, update the system, and perform other setup tasks at the first boot up.
Choosing login methods
You can choose to allow authentication to the server using either password, SSH keys, or both. This is selected in section Miscellaneous Server settings and Allowed login methods. Adding an SSH key and disabling regular password login for the root account are recommended steps for securing your Linux server.
If you have not generated SSH key pairs before, you can find additional instructions for how to manage SSH keys on your cloud server about adding SSH keys after deployment.