Amazon EC2 uses public-key cryptography to encrypt and decrypt login information. Public-key cryptography uses a public key to encrypt a piece of data, such as a password, then you use the private key to decrypt the data. The public and private keys are known as a key pair.
To log on to your instance, you must create a key pair, specify the name of the key pair when you launch the instance, and provide the private key when you connect to the instance. Linux instances have no password, and you use a key pair to log on using SSH.
For more information, see Amazon User Guide for Linux Instances.