About key pairs
A public-key cryptography mechanism allows you to log in to your instance securely. Public key may be used to encrypt information, and private key to decrypt it - together they are known as a key pair. For authentication purposes, the public key will be stored in the instance, and private key should be securely stored on your computer. Public key can't be compromised by accidentally exposing it - since only private key allows the access, and generating private key from a public key is impossible. Thus, you can freely send your public key over insecure communication such as e-mail or instant messenger, or even publish it online - by doing that, you will not compromise security of the instances using that key.
Key pair creation and management
Click on "Key Pairs" in the left column of the portal. This will open the Key Pairs page.
To store a key pair in the system, click on the "Create a key pair" button to open the creation window.
Enter the key pair name. From there, you have two options:
- If you already have a key pair you generated earlier and prefer to use, you can simply save the public key for that key pair to the system.
- If you don't yet have a key pair and would like the system to generate you one - leave this field empty, and the key will be generated automatically.
If public and private key are generated by the platform (means you did not provide your existing public key), you will see a message showing you the newly generated private key. You must copy it and store as your private key content. Once the window is closed, the private key is discarded and can no longer be retrieved!
And just FYI, here is an example how a public key content may look like:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDel/xZ5VGCMxQWG2gJWjWXYNic1muzPbQp1z9gzAhaB55Dd67zpqXZheSBH5BW4hFtTdfXGv5oXM1eC5hVfu+Je8toZfrGNZGnh/r6pPWmQ7EwVW9llDJAieN6cjxaIyQUrx2IVUoSqP8aLBW44LfDuKwdfUlQsJqTlaVQVjwd5xD3Ybmwm1wRwXbHOPf0GW66JZZyfU8kVQ+67zm+NKSTDBbzF0XXCxfdZX6d1kU2l8recnGE/fWHtqE9MyWqUCigJs7+35iyREE2dJK1ePcW+b73KXP4zWRkPgxQBUkDnQqXUS6LVavquqzr22FZAe4D5jUWCmEfP+aI4s32HqJX john@host
A public key is commonly stored in a file named "id_rsa.pub", you can find it in
.ssh folder on a Linux or Mac platform. Don't confuse it with id_rsa file though - this is your private key and it must be protected! A private key content will look like this:
-----BEGIN RSA PRIVATE KEY-----
[key body here]
-----END RSA PRIVATE KEY-----
Note that a public key is only uploaded to the instance during the instance creation. You can't modify or upload a public key into an existing instance via API or portal - however, you can easily do it manually when logged into the instance.