AWS - Get Windows password for EC2 Instance

I'm trying to receive the default Windows password so I can RDP into my EC2 instance. According to the AWS documentation, it's just as simple as sharing the contents of the Key Pair that used during the creation of the instance.

However when I do that, I get the following error:

There was an error decrypting your password. Please ensure that your private key is not encrypted.

Looking at my .pem file, the contents do appear to be encrypted:

enter image description here

So I've tried to decrypt the RSA key using the following command in macOS (taken from this question):

base64 -D -i /Users/home/desktop/pw.txt | openssl rsautl -decrypt -inkey $HOME/aws-remote.pem

But I keep getting the following error in Terminal:

Error reading input Data

The .pem file is being found OK (it gives another error if it can't find it). What am I doing wrong?

2
задан 17 May 2018 в 15:48
1 ответ

Я начал искать другие решения и наткнулся на кое-что, что устранило для меня проблему:

openssl rsa -in $ HOME / .ssh / aws-remote -out / Users / home / desktop / unecrypted-rsa.txt

Amazon был доволен, и я получил свой пароль Windows. Ву!

0
ответ дан 3 December 2019 в 13:57

Теги

Похожие вопросы