MacOS – How to enable telnet server on macOS 10.13.1

high sierrahomebrewmacos

I wanted to add telnet server on my macbook pro(macOS 10.13.1) and followed steps in How to get BSD FTP and Telnet back in 10.13 (High Sierra)? to install telnetd with homebrew.

Everything was OK and I can find telnetd under /usr/local/Cellar/telnetd/54.50.1/sbin. How can I enable telnet server as Daemon?

I tried command

sudo launchctl load -w /Users/public/telnet.plist

No error occurred but didn't work.

This telnet.plist was copied from other macbook and just modified the telnetd path. Are there other options to get telnetd to run and listen for incoming connections?

Best Answer

Use ssh. Really - use ssh. But if you insist:

brew install telnetd

I'll leave this up since the typical homebrew services start script isn't implemented on the stable homebrew version. Once that's done, you can:

brew services start telnetd

The brew services needs a file like this in /usr/local/Cellar/telnetd/54.50.1/homebrew.mxcl.telnetd.plist and possibly the config file in /usr/local/etc/telnetd.conf or wherever.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>homebrew.mxcl.telnetd</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/sbin/telnetd</string>
    <string>--config</string>
    <string>/usr/local/etc/telnetd.conf</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>