John,

You understand that there are two IP addresses and two ports on every connection, right? Not just one as you seem to be implying? Every packet has a source address & source port, as well as a destination address and destination port. You rarely hear people talk about the "source port", as it's usually managed by the OS and will vary with each connection.

But, basically, in TCP it creates a "tuple". SrcAddr/SrcPort/DestAddr/DestPort. I believe there's also some sort of TCP sequence number involved as well. These things are used to identify a specific TCP session in the TCP/IP stack of your operating system.

I don't know if SSH uses a separate TCP session for everything, or if it multiplexes within one. If it multiplexes, then it doubtless includes it's own fields for this as well.

At any rate, I know that it works... I don't need to fully understand the mechanism! :)


jmmckee wrote:
Hi Scott,

Thank you for the clarification. My confusion comes from thinking
that the packets would need to be separated, either by adifferent IP
address, port, or both. If an sftp session is initiated on the i to
the remote location, on the default port, how is an additional
session created, on the default port, when the IP addresses on both
ends are the same, and yet the packets get routed to the appropriate
connection? I thought the connection was the port. If I understand
the process correctly, in addition to ip address and port, there is
also a connection number?

John McKee


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.