Local port number in SFTP

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
vasanthz
Posts: 10
Joined: Thu Aug 03, 2017 4:34 pm

Local port number in SFTP

Post by vasanthz »

Hi,

I have a basic question about SFTP. When we perform SFTP we are able to see a message like below on SYSOUT.

Code: Select all

Connection established, local_addr=123.345.6.7 local_port=44863 remote_addr=100.123.456.891 remote_port=22
In this message, the localport number changes each time in a transfer. For one transfer it was 44680 and another it was 44863, etc..
Suppose if there are hundreds of FTPs running simultaneously, would there be any possibility of running out of ports?

Does the local port need to be static and I did not configure it right?

Please let me know.

Thank you for the great product.

Regards,
Vasanth.S
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Local port number in SFTP

Post by dovetail »

With Co:Z SFTP, the networking is done by IBM z/OS OpenSSH.
What you see reported is the local SSH client port, which is an "ephemeral" port.

https://en.wikipedia.org/wiki/Ephemeral_port
vasanthz
Posts: 10
Joined: Thu Aug 03, 2017 4:34 pm

Re: Local port number in SFTP

Post by vasanthz »

Thank you for the information. Very interesting

Regards,
Vasanth.S
Post Reply