This afternoon I was doing some network maintenance around the house. While inspecting all of my wireless clients, I happened to find a host that I didn't recognize (I name all of my hosts with Aliases in my Ubiquiti network and this guy stuck out like a sore thumb being named with just a MAC address). Usually I can figure out what host it is by looking at the Manufacturer (the first 24 bits of the 48-bit MAC, or the Organizational Unique Identifier (OUI)). In this case it was A8:1B:6A which maps to Texas Instruments.
Unfortunately, Texas Instruments doesn't tell me much as they're a common manufacturer of NIC cards for all kids of IoT devices and I have quite a few...
So, I opted to try telnetting to the box to see if maybe it was listening on the telnet port (you can always hope (or not, due to security concerns)). So, I figured up my favorite Terminal client, SecureCRT, and issued the following:
Huh? Telnet is gone? So, I did a little research and quickly found out that Apple has removed 'telnet' (and 'ftp') from MacOS starting with High Sierra.
So, that leaves us with a conuundrum. First off, let's get 'telnet' (and 'ftp') back on our system under Mojave.
Fortunately, the 'telnet' and 'ftp' binaries that are found under MacOS Sierra (10.12) and earlier still work just fine under High Sierra (10.13) and Mojave (10.14). To make them work, you just need to copy the following binaries from Sierra (or earlier):
/usr/bin/telnet
/usr/bin/ftp
Into /usr/local/bin
on your MacOS High Sierra or Mojave system.
Another option is to leverage a rather powerful network utility that Apple didn't get rid of, NetCat or nc.
To check if a host is listening on the telnet port using NetCat you can just use:
nc -vz hostname 23