Skip to main content
Thiago (Zoz么) Ozores

Thiago (Zoz么) Ozores

Platform Engineer | SRE | Teacher | Scoutmaster

馃 My brain has reached its free quota.
馃毇 Any excess content will be dumped here without prior notice. 鈿狅笍

Recent

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.