Why is 22 the default port number for SFTP? [close

2019-03-22 14:21发布

Why is 22 the default port number for SFTP? Is there any specific reason for this?

标签: ftp port sftp
5条回答
贼婆χ
2楼-- · 2019-03-22 14:39

Ahem, because 22 is the port number for ssh and has been for ages?

查看更多
地球回转人心会变
3楼-- · 2019-03-22 14:42

Why is 21 the default port for FTP? Or 80 the default for HTTP? It is a convention.

查看更多
Luminary・发光体
4楼-- · 2019-03-22 14:48

From Wikipedia:

Applications implementing common services often use specifically reserved, well-known port numbers for receiving service requests from client hosts. This process is known as listening and involves the receipt of a request on the well-known port and reestablishing one-to-one server-client communications on another private port, so that other clients may also contact the well-known service port. The well-known ports are defined by convention overseen by the Internet Assigned Numbers Authority (IANA).

Source

So as others mentioned, it's a convention.

查看更多
贼婆χ
5楼-- · 2019-03-22 14:52

It's the default SSH port and SFTP is usually carried over an SSH tunnel.

查看更多
Deceive 欺骗
6楼-- · 2019-03-22 14:53

Not authoritative, but interesting: 21 is FTP, 23 is telnet. 22 is SSH...something in between (that can take the place of both).

查看更多
登录 后发表回答