Tuesday, 14 November 2017

Telnet, my Telnet - Or macOS High Sierra, what have you done ?

This harks back to a VERY old post: -

which was penned back in 2010.

Since I've upgraded to macOS High Sierra, I've lost the FTP and Telnet clients.

Ordinarily that wouldn't be a problem but ….

Telnet is often useful for testing ports e.g. telnet localhost 9443.

Thankfully, we have a solution …. Netcat.


nc -vnzu 127.0.0.1 9080
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
outif (null)
src 127.0.0.1 port 59595
dst 127.0.0.1 port 9080
rank info not available

Connection to 127.0.0.1 port 9080 [udp/*] succeeded!

nc -vnzu 127.0.0.1 9443
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
outif (null)
src 127.0.0.1 port 54459
dst 127.0.0.1 port 9443
rank info not available

Connection to 127.0.0.1 port 9443 [udp/*] succeeded!

etc.

So it's a bit more fiddly !

So I hacked a solution !

alias 

alias hist='history | cut -c 8-'
alias telnet='nc -vnzu'


So now I can run: -

telnet 127.0.0.1 8443
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
outif (null)
src 127.0.0.1 port 52157
dst 127.0.0.1 port 8443
rank info not available

Connection to 127.0.0.1 port 8443 [udp/*] succeeded!

Bazinga!

2 comments:

Kenio Carvalho said...

You can get telnet again.
Install it using the command : brew install telnet

Dave Hay said...

Yeah, very good point, for which I thank you, Sir !

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...