Tuesday, April 15, 2014

Use nmap to determine whether a port on the cloud instance is open

Typically, if you run into ssh problems on a EC2 instance, you may want to run "nmap" utility to determine if the port is in "filtered", "open" or "closed" state as below:-

$nmap <ec2 instance address> -p 2222 -P0 (Port in "open" state)



$nmap <ec2 instance address> -p 25 -P0 (Port in "filtered" state)


$nmap <ec2 instance address> -p 22 -P0 (Port in "closed" state)


No comments:

Post a Comment