How to install telnet on High Sierra
Open Terminal.app then type:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install telnet
Open Terminal.app then type:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install telnet
Interesting tip.
I would just want to add that there is a good reason Apple removed telnet from the OS.
telnet should only be used when absolutely necessary, such as when you are controlling an older device that does not support a more secure protocol.
In all possible cases, use ssh to connect; never use telnet over the internet.
Alternatively, macOS provided built in nc(netcat), therefore you can use nc in your command line:
nc 192.168.1.1 23 for instance