I decided to stop using password and start using SSH Keys since I am going to share the VM with other developers. So I setup the ssh authorized keys properly and dropped the root password but I forgot to tweak ssh configuration to permite Empty Passwords! and I got stuck outside the VM with password prompt that does not accept any single damn word! :)
So, the simplest solution I found on the internet was to mount the volume to another ec2 instance, fix the password settings and put it back to the unreachable ec2 instance.
Here are the steps :
- First you need to setup Amazon ec2 API tool
- Get instance id from ec2
- Get volume id from ec2
- Stop the unreachable instance
- Detach the volume from unreachable instance
- Start the debugger instance
- attach the volume to the debugger instance
- ssh the debugger instance
- mount the volume
- fix the ssh setting to enable/permits empty passwords
- unmount the volume
- detatch the volume from the debugger instance
- attach the volume to the unreachable instance
- now try to ssh, if it did not work you need to repeat the steps and keep fixing the configs until it works.
No comments:
Post a Comment