Skip to main content

Troubleshooting

Telnetting without the telnet command

·260 words·2 mins· loading · loading
Do you need to test connectivity between a server or container and another host/port, but the telnet command (or any other equivalent tool) is missing? Don’t despair, my friend. If your server or container has the Bash shell, you can still test connectivity to any host and port. Just use this “secret” Bash feature: timeout 1 bash -c 'cat < /dev/tcp/google.com/80' && echo "Port open" || echo "Port closed" Note google.com and port 80 are just examples. You should replace them with the specific host and port you want to test from your source server or container.