Skip to content

Conversation

@tomaswolf
Copy link
Member

If SshClient creates an empty HostConfigEntry, supply the default port if the given port is <= 0.

I'd have liked to do that once and for all in HostConfigEntry.getPort(), but HostConfigEntry.append(Appendable a) relies on getPort() returning a value <= 0 if not set.

If there is a HostConfigEntry for the proxyJump, then HostConfigEntryResolver.resolveEffectiveHost() would already supply the default port. (That bit was fixed in version 2.10.)

Fixes #727.

If SshClient creates an empty HostConfigEntry, supply the default port
if the given port is <= 0.

I'd have liked to do that once and for all in HostConfigEntry.getPort(),
but HostConfigEntry.append(Appendable a) relies on getPort() returning a
value <= 0 if not set.

If there _is_ a HostConfigEntry for the proxyJump, then
HostConfigEntryResolver.resolveEffectiveHost() would already supply the
default port. (That bit was fixed in version 2.10.)
@tomaswolf tomaswolf merged commit 8132228 into apache:master Apr 12, 2025
7 checks passed
@tomaswolf tomaswolf deleted the gh-727 branch April 25, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProxyJump: no default port supplied if there is no HostConfigEntry for the jump host

1 participant