Today one of our production machine (Amazon EC2) was down and I couldn't bring-up the instance since I can't get into SSH, connection was refused and I had no clue what to do, after sometime I was able to bring-up the instance - (ok short and sweet).
I somehow figured out the root-cause of the problem which was /dev/urandom file missing and hence, SSH was not able to start. I had to create this file upon reboot and I created it by adding few lines of code in one of the existing start-up (init) script and could get the server up and running means I can SSH into the box.
I need an expert advice on the following and please don't hesitate to give me more information:
- should I leave those lines of code that I had written in one of the init-script file?
- what could be the reason of missing
/dev/urandomfile? - what should I do to avoid such situation in future?
Thanks.
UPDATE:
For those who want to know what I wrote:
#!/bin/bash
cd /dev ; /sbin/MAKEDEV urandom ; /etc/init.d/ssh start