0

I'm trying to connect to the cisco labs but I found that mac sierra no longer has the telnet client. The terminal error is as follows:

[Command not found: telnet]

[Could not create a new process and open a pseudo-tty.]

The first thing I did was install the latest version of xcode to then install telnet with homebrew but I still can not connect with the labs. Then I found a possible answer:

If you restore telnet via brew or something else you have to put the telnet application into the /usr/bin directory. If it isn't there the telnet URLs when calling terminal will be broken. However... the /usr/bin directory is locked with SIP (System Integrity Protection). You need to disable SIP in order to modify the /usr/bin directory. Reboot your mac... before the apple logo appears hit CMD+r. select "Utilities" then "Terminal". Type "csrutil disable" at the command line. then reboot normally. Place the telnet application in the /usr/bin directory. Then reenable SIP by doing the steps above but using "csrutil enable"

I followed the steps but I do not know exactly which file is the one that I need to move to usr / bin. I am not very expert in this topic so try to find the file with sudo find / -name telnet and find the following:

/usr/local/bin/telnet
/usr/local/var/homebrew/linked/telnet
/usr/local/opt/telnet
/usr/local/Cellar/telnet
/usr/local/Cellar/telnet/54.50.1/bin/telnet
/Library/Ruby/Gems/2.3.0/gems/net-telnet-0.1.1/lib/net/telnet
/Users/joseandradecruz/Library/Logs/Homebrew/telnet

I tried with the first file that is in usr/local/bin/telnet but it did not work

MBT
  • 21,733
  • 19
  • 84
  • 102
Pepe Andrade
  • 11
  • 1
  • 4
  • What do you mean "it did not work"? Please be more specific on what it actually did. Also it looks like you might have multiple versions of telnet. Try this command in terminal; `which telnet`, then list the output. – l'L'l Jun 05 '18 at 20:11
  • What I wanted to say is that the terminal keeps sending me the same message `[Command not found: telnet]` `[Could not create a new process and open a pseudo-tty.]` when I try to connect – Pepe Andrade Jun 05 '18 at 20:24
  • the output of the command was this: `-bash: wich: command not found` – Pepe Andrade Jun 05 '18 at 20:27
  • `which` is a shell built-in, you've spelled it wrong missing the first h – grg Jun 05 '18 at 21:37

2 Answers2

2

Once SIP is disabled, you can add a symlink to /usr/local/bin/telnet in /usr/bin/:

sudo ln -s /usr/local/bin/telnet /usr/bin/

You don't need to actually move telnet into the /usr/bin folder. The symlink provides access as if the file was there, for applications which don't have /usr/local/bin in the path.

grg
  • 5,023
  • 3
  • 34
  • 50
0

I also had problem to lunch telnet while using Cisco LAB or eve-ng.

*disabled sip -> ln telnet to /usr/bin -> enable sip

happy laying :)

al3x
  • 1