Howto Check Network Port Availability from vMA

VMwares vSphere Management Assistant does not have much tools available. When you vMA is behind a firewall you might want to check if ports are reachable for troubleshooting purposes. As the vMA does not come with telnet or netcat you can use the built in bash feature:

Bash Manpage

/dev/tcp/host/port
 If host is a valid hostname or Internet address, and port is an integer 
 port number or service name, bash attempts to open a TCP connection to 
 the corresponding socket.
dev/udp/host/port
 If host is a valid hostname or Internet address, and port is an integer 
 port number or service name, bash attempts to open a UDP connection to 
 the corresponding socket.

Usage

vi-admin@vma.virten.local:~> cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.1
^C

A list of services and port numbers is available at /etc/services

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>