Live data from Hacker News

How SSH Port Became 22

ssh.com

11–20 of 89 posts

Re: How SSH Port Became 22

#11
post #7

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…

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 text terminal.

Re: How SSH Port Became 22

#13

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…

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?

Re: How SSH Port Became 22

#14
post #12
post #5

Uh, it was the next available near 23/telnet which it aimed to replace?

That’s why, not how. The how is interesting.

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.

Re: How SSH Port Became 22

#16
post #12

Earlier quoted context omitted.

That’s why, not how. The how is interesting.

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. :-)

Re: How SSH Port Became 22

#17
post #13

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…

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?

Perhaps it received command responses from the data port too.

Re: How SSH Port Became 22

#18
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. :-)

Was?

Re: How SSH Port Became 22

#19
post #13

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…

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.

Re: How SSH Port Became 22

#20
post #13

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…

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?

> Wouldn't FTP need three simplex connections - commands to server, responses from server, data transfer?

AFAICT, per RFC 114, responses from the server are considered a data type: when a user sends a command to the server, sometimes the response is a status update ('MKDIR successful'†) and sometimes the response is the requested file.

The data structure of the response has fields to say what's coming back on the data channel for the requested transaction.

† MKDIR was not a command, just using it as an modern example.

Post reply on HN