2

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?

2

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>
  • I'm too tired to put in a pull request / defect or stub the services part, but perhaps GDP2 has this on their radar already. I hate to impose though since they already ported the telnetd for us all. – bmike Feb 2 '18 at 4:17
  • Thanks for making this plist. In my PR, I had Apple's original plists which facilitated management of these programs via launchd. I hoped that the maintainers would accept said plists to allow the daemons to be run via brew service but the homebrew maintainers rejected them since they needed to be installed to /Library or /System for the daemons to run properly. – GDP2 Apr 14 '18 at 23:03
  • Unfortunately, homebrew seems to be more and more rejecting certain use-cases and APIs insomuch that the maintainers express a blatant disregard for users. Macports is looking like a more attractive alternative since this trend seems to be pervading homebrew in an unsettling way. – GDP2 Apr 14 '18 at 23:04
1

After installing telnetd with Homebrew, as you did, I was able to get it working with:

telnetd -debug [port]

where [port] is replaced with the number of the port on which you want to listen for incoming telnet connections.

By the way, you wrote that you located telnetd in the 'sbin' folder; you may also find a 'share' folder at the same level which contains a man page on telnetd. According to the man page, "[t]he -debug option may be used to start up telnetd manually, instead of through inetd."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .