In the previous section, we saw how to connect to Linux instances using a private key for authentication. In this section, we're going to see how the process works for Windows instances.
For Windows, we use the remote desktop protocol, and log in as administrator. We will obtain the administrator password, then we will log in to the instance from Windows. When AWS launches in a Windows instance, it creates a random password for the administrator user. The public key associated with the instance is used to encrypt the password. The encrypted password can only be decrypted with the private key portion of the key pair.
You can decrypt the password easily in the management console.
Go to EC2, go to Running Instances, select the instance, and under the Actions menu choose Get Windows Password.
Notice that it gives the name of the key pair...