LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-18-2010, 01:50 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
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
tcp        0     52 172.17.70.145:22            172.19.31.64:2104           ESTABLISHED
tcp        0      0 172.17.70.145:22            172.19.31.64:2354           ESTABLISHED
tcp        0      0 ::ffff:172.17.70.145:445    ::ffff:172.19.31.64:2692    ESTABLISHED

Last edited by vinaytp; 02-18-2010 at 01:51 AM.
 
Old 02-18-2010, 01:55 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 02-18-2010, 01:59 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
Thanks Chaitanya,

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?
 
Old 02-18-2010, 02:14 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqld running and reading for connections on port 3306, no port 3306 found from scan darkenigmaa Linux - Networking 10 07-13-2016 12:53 PM
Multiple Connections using wget utw-mephisto Linux - General 8 07-16-2012 03:49 AM
multiple connections from the same host port 80 paranoid times Linux - Security 1 02-10-2007 02:51 AM
Multiple internet connections kojie Linux - Networking 2 12-08-2004 04:19 PM
Multiple Wireless Connections vanv101 Slackware 7 10-24-2004 08:39 AM


All times are GMT -5. The time now is 01:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration