aws ec2 インスタンスの状態?を見る

curl http://169.254.169.254/latest/dynamic/instance-identity/document
{
“instanceId” : “i-e40855e1”,
“billingProducts” : null,
“version” : “2010-08-31”,
“region” : “ap-northeast-1”,
“accountId” : “xxx”,
“imageId” : “ami-xxx”,
“kernelId” : “aki-xxx”,
“ramdiskId” : null,
“architecture” : “x86_64”,
“pendingTime” : “2013-08-17T12:19:40Z”,
“instanceType” : “t1.micro”,
“availabilityZone” : “ap-northeast-1a”,
“devpayProductCodes” : null,
“privateIp” : “xxx”
}

 

AWS RedHat AMI で stop/start すると sshd が failed して ssh 接続できない

RedHat6.4のバグだそうで。

Was able to fix this. This is due to a bug from REDHAT for 6.4 rhel instances[https://bugzilla.redhat.com/show_bug.cgi?id=956531]. After launching the machine from an AMI. Connect to the machine and switch to root user and make below changes to /etc/rc.d/rc.local file …

Remove the following three lines and save the file:

cat <> /etc/ssh/sshd_config UseDNS no PermitRootLogin without-password ../ One should also remove garbage entries from /etc/ssh/sshd_config file .. The machine once rebooted after these changes works fine.

Thanks Ashwani

 

http://stackoverflow.com/questions/17296655/ec2-instance-launched-from-ami-not-reachablessh-after-start-stop-or-reboot

https://bugzilla.redhat.com/show_bug.cgi?id=956531