When macOS High Sierra (10.13) was released, the telnet
utility disappeared. This has probably been a good move by Apple since telnet
is outdated and not a secure protocol; it shouldn't be used in general. However, telnet
did serve a useful function - checking if it was possible to connect to a remote server on a particular port. Luckily there is a much better tool for this included in macOS - nc (netcat)
is simple and it has command line arguments that are very similar to telnet
. I like to use the -vz
arguments whenever I need to check if a remote server can be reached on a particular port. These arguments make nc
have this behaviour...
-v Have nc give more verbose output.
-z Specifies that nc should just scan for listening daemons, without sending any data to them.
The result is nc
tries to connect to the server and then immediately terminates if it succeeds. Here's an example...
If a connection cannot be established and a timeout is reached the output is like this (timeout can be controlled via the -G option i.e. -G 5
If a connection is refused, the output is like this...
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...