Friday, May 28, 2021

Using curl for Telnet Testing

Rich Trouton:

As part of introducing macOS High Sierra, Apple removed the telnet tool from macOS. This was part of Apple’s overall effort to improve security, as telnet does not use encryption and its traffic can be intercepted and read. However, telnet did (and does) serve a useful function as a quick way to check if it is possible to connect to a remote server on a particular port.

While there are alternative tools available for this task (like netcat), it’s also possible to still create a telnet connection on macOS using another tool: curl

2 Comments RSS · Twitter

Nothing against curl, but I copied the telnet binary from Sierra, and it still works fine on Big Sur 11.4.

curl kind of doesn't have the simplicity of telnet.

Windows did this long ago (with Vista, I wanna say?), although they provide a UI for re-adding it as a feature. `cinst TelnetClient -source WindowsFeatures` used to be one of the first things I did on Windows machines.

I could never really get into the PowerShell mindset, but `Test-Connection -TcpPort 22 -TimeoutSeconds 5 somehost.example` (with autocompletion) is pretty nice.

Leave a Comment