1 Answer
- Newest
- Most votes
- Most comments
1
Here are a few things you can try to regain connectivity to your EC2 Windows instance that was rebooted into safe mode without networking:
- Stop the instance, detach the root volume, attach it to another working instance as a data volume, modify the safeboot option in the registry to disable safe mode, detach volume, reattach to original instance, start instance.
- Attach the root volume to another working instance as above, mount it, modify the c:\Windows\System32\drivers\etc\hosts file to add a fake entry mapping the instance's private IP to "localhost". This will allow RDP login while in safe mode.
- If you have Powershell remoting enabled, you may be able to connect via Powershell to the private IP even in safe mode. Try Enter-PSSession -ComputerName <private_ip>.
- Connect the instance's ENI to a new temporary instance. Login via RDP, browse to the original instance's root volume, make registry or hosts file changes to disable safe mode. Detach ENI afterwards.
- Launch a new instance in the same subnet, enable RDP access. UsePsExec from the working instance to execute commands on the original instance and disable safe mode.
The key is mapping the private IP to localhost or attaching the root volume to another instance to modify the safeboot registry key or hosts file. Let me know if any of these options are able to regain connectivity!
answered 8 months ago
Relevant content
- asked 7 months ago
- asked 4 years ago
- asked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago