![]() |
Is it possible to use a port for multiple connections ?
Hello everybody,
Am I right in saying following ? A deamon say ssh will be listening on port 22. when a new connection is requested by the client, it will be authenticated and a new connection gets establihed with some port say 1025. And ssh will continue to listen on 22 for new connections. If I am correct then in my machine I observed following connections are establised to ssh port 22, As per my understanding connection should be established on a different port other than 22. Code:
[vinay@vinay conf]$ netstat -an | grep ESTABL |
It is the client that used a random port number to communicate on port 22 on the server and you can clearly see that all the ssh connections are to be made on port 22 where ssh daemon is listening.
|
Quote:
What you mean to say is a port is capable of listening and making multiple connections ? If so why can't client can make use of same port for both the connections? |
A connection is not made entirely on the basis of listening port on the server itself. When the connection is established the source of the connection and the source port is also taken into account by the ssh server and it manages the connection on source port and ip.
Does not a web server listen on port 80 and still manages to serve multiple requests? |
All times are GMT -5. The time now is 12:17 AM. |