News for hackers. Stuff that matters.
Re: by kstrauser on Saturday June 03, 2023 @03:58PM (#36179992)
My fingers type “telnet” themselves out of muscle memory, but is it actually better for anything than netcat?
Re: by kqr on Sunday June 04, 2023 @02:46AM (#36183588)
It took me a while but is Ncat the same thing as netcat?

Edit: ah, clarified by other page:

> Ncat is our modern reinvention of the venerable Netcat (nc) tool released by Hobbit in 1996. While Ncat is similar to Netcat in spirit, they don't share any source code.

Re: by JdeBP on Sunday June 04, 2023 @04:50AM (#36184106)
There are actually several tools in this vein. Although there are a handful that do, some others don't even go by the name "cat" at all.
Re: by bdowling on Saturday June 03, 2023 @05:59PM (#36180923)
Short version:

Telnet better supports interactive terminal applications by exchanging info like the TERM environment setting, screen size, translation codes, etc.

Netcat doesn’t do any of that, but is simpler and better suited for sending or receiving binary data. It also has features that telnet doesn’t, like listening for incoming TCP connections and sending and receiving on UDP ports.

Re: by hddqsb on Sunday June 04, 2023 @01:59PM (#36187785)
Obligatory: Telnet is better than netcat for interactive logins, but SSH is even better than Telnet for that. So don't use Telnet.
Re: by bdowling on Sunday June 04, 2023 @06:02PM (#36190018)
Agreed.

It's pretty rare to use Telnet these days. The exception is when you have to connect to devices like automation equipment, test equipment, admin ports on LAN switches, etc. Those devices shouldn't be on the internet, so they're not as much of a concern.

Re: by dgl on Saturday June 03, 2023 @07:42PM (#36181600)
Same; I made a ~/bin/telnet that does:

    #!/bin/sh
    nc -v "$1" "${2:-23}"
Obviously it doesn't do the telnet protocol when run on port 23 (note the real telnet client disables the telnet handshake when port != 23, which is why it's useful as a generic TCP client anyway), but this basically keeps my muscle memory happy and it's clear from the output what's happening.
Re: by JdeBP on Sunday June 04, 2023 @04:48AM (#36184092)
Someone with initials "DJB" did much the same thing in 1999. (-:

    % cat /package/admin/djbwares/command/mconnect
    #!/bin/sh
    # WARNING: This file was auto-generated. Do not edit!
    exec /usr/local/bin/tcpclient -RHl0 -- "${1-0}" "${2-25}" /usr/local/bin/mconnect-io
    %
* https://jdebp.uk/Softwares/djbwares/guide/commands/mconnect....

* https://jdebp.uk/Softwares/djbwares/guide/commands/mconnect-...

* https://jdebp.uk/Softwares/djbwares/guide/commands/[email protected]...

* https://jdebp.uk/Softwares/djbwares/guide/commands/[email protected]

Re: by ipv4dhcp on Sunday June 04, 2023 @08:05AM (#36184954)
this is the comment i was looking for. netcat is the better option for testing network ports.