Live data from Hacker News

How SSH Port Became 22

ssh.com

21–30 of 89 posts

Re: How SSH Port Became 22

#21
post #16

Earlier quoted context omitted.

Correction: 1 guy + 1 gal, not 2 guys. Joyce K. Reynolds was a woman. :-)

Was?

Channelling Mitch Hedberg:

She used to be a woman. She still is, but she used to, too.

* https://www.youtube.com/watch?v=VqHA5CIL0fg

More seriously, she passed away in 2015:

* https://en.wikipedia.org/wiki/Joyce_K._Reynolds

Re: How SSH Port Became 22

#23
post #16

Earlier quoted context omitted.

Not really. He asked IANA, which was literally 2 guys in a room back in the 90's. Literally anyone could get a port assigned in those days, just like anyone could get a /24 address block.

Correction: 1 guy + 1 gal, not 2 guys. Joyce K. Reynolds was a woman. :-)

Gender is just a social construct anyway.

Re: How SSH Port Became 22

#25

Personally I find how/why FTP uses two ports, 20 and 21, to be more interesting: So the first thing to know is the FTP is 'old', in that it predates TCP and originally ran on NCP: > The original specification for the File Transfer Protocol was written by Abhay Bhushan and published as RFC 114 on 16 April 1971. Until 1980, FTP ran on NCP, the predecessor of TCP/IP.[2] The protocol was later replaced by a TCP/IP versio…

>... was carried over for simplicity's sake.

Or for simplexity's sake!

From the previous discussion of SSH port 22:

https://news.ycombinator.com/item?id=14178993

Back in the "bad old days" of the simplex NCP protocol, before the full duplex TCP/IP protocol legalized same-sex network connections, connect and listen sockets had gender defined by their parity, and all connections were required to use sockets with different parity gender (one even and the other odd -- I can't remember which was which, or if it even mattered -- they just had to be different). The act of trying to connect an even socket to another even socket, or an odd socket to another odd socket, was considered a "peculiar error" called "homosocketuality", which was strictly forbidden by internet protocols, and mandatory "heterosocketuality" was called the "Anita Bryant feature".

https://en.wikipedia.org/wiki/Network_Control_Program

http://www.saildart.org/IMPSER.DOC[SS,SYS]

    When the error code is zero, the next 8 bit byte
    is the Stanford peculiar error code, followed by 
    72 bits of the ailing command returned. Here are 
    the Stanford error codes. [...]

    IGN 3 Illegal Gender (Anita Bryant feature--sockets 
    must be heterosocketual, ie. odd to even and even
    to odd) [...]

    Illegal gender in RFC, host hhh/iii, link 0

    The host is trying to engage us in homosocketuality.
    Since this is against the laws of God and ARPA, we
    naturally refuse to consent to it.
http://www.saildart.org/FTP.NCP[S,NET]

    ; Try to initiate connection

    loginj:
            init log,17
            sixbit /IMP/
            0
            jrst noinit
            setzm conecb
            setom conecb+lsloc
            move ac3,hostno
            movem ac3,conecb+hloc
            setom conecb+wfloc
            movei ac3,40
            movem ac3,conecb+bsloc
            move ac3,consck
            trnn ac3,1
                jrst gayskt            ; only heterosocketuals can win!
             movem ac3,conecb+fsloc
             mtape log,[
                   =15
                    byte (6) 2,24,0,7,7
                         ]          ; Time out CLS, RFNM, RFC, and INPut

    [...]

    gayskt:    outstr [asciz/Homosocketuality is prohibited (the Anita Bryant feature)

    /]

        ife rsexec,exit       1,
(The PDP-10 code above adds the connect and listen socket numbers together, which results in bit 0 being 0 if they are the same gender, then TRNN is "test bits right, no change, skip if non zero", which skips the next instruction (jrst gayskt) if they different sex.)

Re: How SSH Port Became 22

#26
post #19
post #13

Earlier quoted context omitted.

Also, Telnet was originally port 1 and FTP was port 3 (RFC 433, December 1972). On an incompatible protocol change (mentioned in RFC 542, August 1973), they were "temporarily" moved to 23 and 21 respectively until the old versions were taken down. Of course, the move back to 1 and 3 never happened. Wouldn't FTP need three simplex connections - commands to server, responses from server, data transfer?

FTP puts data and commands on the same socket. This is perfectly doable in NCP.

> FTP puts data and commands on the same socket.

Not on TCP it doesn't. And some of the Arpanet FTP RFCs refer to separate connections as well, e.g. for the MAIL and MLFL commands which send email over the command and data connections, respectively. (SMTP didn't exist yet so mail was sent over FTP.)

Re: How SSH Port Became 22

#27
This makes me wonder. What such booming technology is there right now where I can contribute something like this and make a mark for myself?

Having born much later in the history of Internet, I think I have missed out on many of the early magical years of the Internet.

But if I can get involved in some other technology that is in early stage and booming and where I have a chance to contribute something that may become a de-facto standard 10 years from now, that's something I will be very interested to invest my time on.

Re: How SSH Port Became 22

#30
post #7

Earlier quoted context omitted.

I've written a lot of TCP deep-packet inspection code, including parsing FTP control protocol. So I was surprised by this post by Robert Graham: https://blog.erratasec.com/2019/08/hacker-jeopardy-wrong-ans... - FTP control protocol follows the specification for Telnet.

You might find the MUD community interesting in this regard, as they've built de facto standards for 16-bit color encoding, text compression, hidden sideband metadata communication usable by clients, and even simple embedded HTML and image rendering all on top of telnet. On top of that, because of the wildly varying capabilities of MUD clients, every single feature has to be totally backwards-compatible with a plain…

Some MUDs even have sound!
Post reply on HN