What is an SSH key?
SSH key — a pair of cryptographic keys (private and public),used for secure passwordless access to servers.
- Public key is added to your account and later attached to an instance.
- Private key is stored by the user and used for authentication.
Never share your private SSH key. It is as sensitive as the 3 digits on the back of your bank card.
Create your first SSH key
- Linux & MacOS
- Windows
-
Generate a key pair:
-
Enter the file names for the keys or press Enter to keep the default. For extra security, protect the key with a passphrase by entering it twice. If set, you will need to enter it each time you use the key; press Enter twice to skip.
-
A confirmation will appear. The private key stays on your device and must not be shared, while the public key is copied to the server you plan to access.
-
To read the file, run
This line starting with ssh-rsa is your public key. Copy it and paste it when creating an SSH key. Go to the SSH keys page and click Add new SSH key.