A key pair, or SSH key pair, is an authentication method used when you remotely log in to Linux instances. A key pair is generated using an encryption algorithm. It contains a public key, and a private key reserved for you. The public key is used to encrypt data (for example, a password), and the private key is used to decrypt the data.
The cloud platform stores the public key, and you need to store the private key. Do not share your private key with anyone. Keep your private key secure.
The key pair is more secure and convenient than the username/password method.
Item |
Key Pair |
Username and Password |
|---|---|---|
Security |
|
Poor security |
Convenience |
Simultaneous login to a large number of Linux instances, simplifying management |
Login to only one Linux instance at one time, giving no chance of batch maintenance |
When a key pair is generated, download and properly keep it.