I want to see if an Amazon EC2 instance is open, but by default Amazon EC2 blocks ping requests. There is a way to do this by changing the security policy of the instance. Excluding that, what would be the closest alternative to "see if a server is responsive" and is light-weight?
Is curl
a good option?
If you can ssh
to it then it's up. A simple way of checking this with nc
is:
nc -zv 111.222.333.444 22
(Replace 111.222.333.444 with the ip address of your instance)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With