简体   繁体   English

AWS [EC2] - 我无法获得 Windows 密码

[英]AWS [EC2] - I can't get my Windows password

I lost my.PEM key.我丢失了我的 .PEM 密钥。 I created an image of my instance and created a new key, executed the new instance, however, when trying to recover my password it shows the message "Please wait at least 4 minutes after launching an instance before trying to retrieve the auto-generated password. ".我创建了我的实例的图像并创建了一个新密钥,执行了新实例,但是,当尝试恢复我的密码时,它显示消息“请在启动实例后至少等待 4 分钟,然后再尝试检索自动生成的密码.". But it's been 24 hours and nothing.但是24小时过去了,什么都没有。

Has anyone had a similar problem?有没有人遇到过类似的问题? What can I do?我能做些什么?

It sounds like either the password wasnt reset when you restored the ami, or the agent isnt starting up properly so the password isnt being sent to the console.这听起来像是在您恢复 ami 时未重置密码,或者代理未正确启动,因此密码未发送到控制台。

You can try and use Systems Manager(Session Manager or the Run command) to run PowerShell commands on the instance to create a new user in the administrators group or reset an existing users password.您可以尝试使用 Systems Manager(会话管理器或运行命令)在实例上运行 PowerShell 命令,以在管理员组中创建新用户或重置现有用户密码。 This requires an agent to be preinstalled on the system to work - its normally installed in the aws windows AMI and just requires an IAM instance role for SSM to work.这需要在系统上预先安装一个代理才能工作 - 它通常安装在 aws windows AMI 中,并且只需要一个 IAM 实例角色即可让 SSM 工作。

If you cant connect with SSM you need the agent log files, or possibly the sysprep log files off the disk to figure out whats going wrong.如果您无法与 SSM 连接,您需要代理日志文件,或者可能需要磁盘上的 sysprep 日志文件来找出问题所在。 You would access those by attaching the boot disk of your instance to a new temporary instance (make a note of the config before detaching the disk, you must use the same settings when reattaching the disk, doesnt matter where you attach the disk on the temp instance).您可以通过将实例的引导磁盘附加到新的临时实例来访问它们(在分离磁盘之前记下配置,重新附加磁盘时必须使用相同的设置,无论您将磁盘附加到临时的位置实例)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM