Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added source port feature #130

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added source port feature #130

wants to merge 3 commits into from

Conversation

Zibri
Copy link

@Zibri Zibri commented May 4, 2019

ssh is since a long time missing the feature to set an arbitrary source port for the connection.
thus forcing people to use "ProxyCommand" option and use nc or ncat to force the source port.
I added the feature in the client directly so (from root user if port <1024) you can use -Z portnum to specify
the source port.

@Zibri
Copy link
Author

Zibri commented May 4, 2019

Note: this could be put in options.

@Zibri
Copy link
Author

Zibri commented May 4, 2019

Added -Z portnum option in:
ssh
scp
sftp

@djmdjm
Copy link
Contributor

djmdjm commented Sep 13, 2019

IMO this is a very niche feature and not useful to the majority of users. I don't want to assign a scarce option letter for it. Perhaps it could be implemented by extending the existing BindAddress option, e.g.
ssh -oBindAddress=*:1234
would try to use source port 1234. What do you think?

@matthieu-labas
Copy link

Perhaps it could be implemented by extending the existing BindAddress option, e.g.
ssh -oBindAddress=*:1234
would try to use source port 1234. What do you think?

It can be useful for further firewall filtering, but I agree it's not common so extending BindAddress would be nice.

@Zibri
Copy link
Author

Zibri commented Mar 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants