Knowledge Base
Accounts
Billing and payments
Cloud server volumes
Cloud servers
Cloud storage
Customer portal
Data centers and network
Data privacy and data portability
Dedicated servers
Firewall
How it works
Kubernetes clusters
L2 segments
Linux administration
Load balancing
Support
VPN to GPN
Windows administration
Embargoed and Sanctioned Countries
How to add new SSH key to a cloud server
To use а SSH key pair to connect to a server, the "public" part of the pair has to be placed on the server. Please refer to the first section of the "How to create and access a Linux-based cloud server via an SSH key" article for instruction on how to generate key pairs under Windows, Mac, and Linux.
Now, when you have a key pair, you need to add a public key to the "authorized_keys" file in your home directory on the server.
1. Connect to the server using your current key
2. Add a public key to the "authorized_keys" file
You can add a public key to the "authorized_keys" file using "nano" text editor (or any text editor of your choice):
Paste your public key from the new line:

Save changes by pressing Ctrl+X, Y, Enter.
If you don't have "nano" installed
You can install "nano" by running the following commands on Ubuntu:
On CentOS:
3. Verify new key
Do not terminate existing SSH session. Open new session with the key you have just added:
If the connection is established successfully, you all right. To remove one of the keys, just remove it from "authorized_keys" using the same "nano".