68

There are some real problems with not having ftp and telnet present in 10.13 now as per Apple's dictate.

Has anyone found a solid way to bring BSD ftp and telnet back to macOS vs using inetutils?

ylluminate
  • 5,311

6 Answers6

64

Apple's Telnet and FTP programs are back in High Sierra thanks to this homebrew pull request (by yours truly). Both the client and server of each one are back, and these are Apple's original versions of these programs.

inetutils unfortunately exhibits some bugs on High Sierra so this will be a better solution and should make everyone happy.

To install ALL the formulas in that PR, run this at the command line:

brew install tnftp tnftpd telnet telnetd

Of course you can install each of these separately as well:

# TNFTP client & server (formerly known as LukeMFTP, presumably due to being developed by Luke Mewburn 
# and has been the default FTP for default FTP client included with NetBSD, FreeBSD, OpenBSD, DragonFly BSD, 
# Darwin (macOS), and MidnightBSD):
brew install tnftp 
brew install tnftpd 

# Telnet client & server:
brew install telnet 
brew install telnetd
ylluminate
  • 5,311
GDP2
  • 1,328
  • 15
  • 24
  • 5
    Wow, that is some excellent work and I'm so happy to see these divided up into separate components so that we don't have to just be bound to installing all clients and services! – ylluminate Jan 15 '18 at 01:00
  • 1
    Everyone may also be interested to know that tnftp has better completion than the GNU version! This is absolutely the best solution. – ylluminate Jan 15 '18 at 01:14
  • How does one actually turn on the ftp server once installed with this method? – Jon Thompson Apr 02 '18 at 17:06
  • 1
    @JonThompson Should be as easy as sudo ftpd -D. Look in man 8 ftpd for more information, plus there are a lot of tutorials floating around on the net which describe this sort of thing for both BSD and Linux. – GDP2 Apr 02 '18 at 19:38
26

Using Homebrew:

brew install inetutils

This will restore telnet, ftp, etc...

Can't believe Apple removed such a fundamental utilities from the command line.

user3439894
  • 58,676
18

You could try grabbing libtelnet and lukemftp from the open source repository for macOS 10.12.6 and compiling them for yourself.

If you use homebrew, BSD telnet is prepackaged and installable via brew install telnet.

vykor
  • 2,143
  • 1
    There are some issues going on that this doesn't resolve as noted above unfortunately. As for the 10.12.6 source, yeah, that might be the best path at the moment, but it's not something that will likely remain a viable solution... – ylluminate Sep 28 '17 at 21:31
  • 1
    brew install telnet is the easiest solution in my opinion! – MichielB Nov 02 '17 at 13:23
  • 2
    Notice the new accepted answer here @MichielB. It's the best and easiest now. – ylluminate Jan 14 '18 at 23:21
10

Telnet is include in the inetutils port in MacPorts. To install it use the port command:

sudo port install inetutils
mmmmmm
  • 30,160
david
  • 109
2

grab the binaries from a Sierra install /usr/bin ;)

nanard
  • 37
  • or a TimeMachine backup :-) – nohillside Sep 27 '17 at 21:32
  • 1
    The problem is that I'm looking for a permanent solution, not a temporary patch. It's looking like we're going to have to go with FreeBSD or something else via a fork. – ylluminate Sep 28 '17 at 21:29
  • @ylluminate There are security reasons not to use ftp and telnet changing OS to get them sounds like the wrong solution - try using the replacement tools e.g. sftp , ssh etc – mmmmmm Oct 04 '17 at 20:33
  • I agree with nanard copying telnet and ftp from /usr/bin on a NOT High Sierra MAC it is fast and it works and the X-Code thing is a mess – Steve Oct 09 '17 at 23:10
  • 3
    @Mark while there are indeed reasons not to use the unsecured protocols, there are also plenty of remaining requirements to use them - typically when interacting with legacy systems, especially those firewalled on private networks. Generally speaking, the decision of what protocols are allowed should be made on the server side, since that is the system that potentially could be compromised - forcing it on the client side is completely wrong-headed, as the designers of the client system can't know what it will be used to talk to. – user221106 Oct 28 '17 at 23:34
  • @Mark I also use telnet to test open ports while debugging. – Philip Kearns Dec 21 '17 at 22:31
0

I searched through Apple support forums and found an answer that I believe will help others reinstall ftp and telnet on Mac High Sierra.

Navigate to www.gnu.org/software/inetutils/ Click on the HTTP download link for "Inetutils" Download "inetutils-1.9.4.tar.gz" tar zxvf inetutils-1.9.4.tar.gz

Direct ftp site -> http://ftp.gnu.org/gnu/inetutils/

cd inetutils-1.9.4
./configure
make
sudo make install
telnet x.x.x.x port

I found the answer at this forum https://forums.developer.apple.com/thread/79056

Jolley71717
  • 1,707