When we use web brower to use google
, we type www.google.com
in the web brower. I know it equals to www.google.com:80
because the default port number is 80
in http protocol.
When we use ssh
to connect our local PC to remote server, we use ssh user@remote
, which equals to ssh user@remote -p 22
because the default port number is 22
in ssh
protocol.
My first question is:
Are the default port number 80
in http or 22
in ssh local port or remote port?
I guess the answer is: remote port. Because if we use severl ssh
commands to connect our local PC to several different remote servers, the default port are always 22
. If we use several web browers to google something, the default port number are always 80
.
My second question is:
If we use severl ssh
commands to connect our local PC to several different remote servers, what is the local port number
for different ssh
sessions? If we use severl web browers to connect our local PC to www.google.com
, what is the local port number
for different web browers?
question from:
https://stackoverflow.com/questions/65545397/which-local-port-is-used-for-http-or-ssh-protocol 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…