tomaswolf commented on code in PR #477: URL: https://github.com/apache/mina-sshd/pull/477#discussion_r1529240241
########## sshd-core/src/main/java/org/apache/sshd/client/SshClient.java: ########## @@ -683,8 +683,11 @@ protected List<HostConfigEntry> parseProxyJumps(String proxyJump, AttributeRepos String host = uri.getHost(); int port = uri.getPort(); String userInfo = uri.getUserInfo(); - HostConfigEntry entry = resolveHost(userInfo, host, port, context, null); - jumps.add(entry); + HostConfigEntry entry = null; + do { + entry = resolveHost(userInfo, host, port, context, null); + jumps.add(entry); + } while((host = entry.getProxyJump()) != null); Review Comment: The list may also need to be reversed. Both your configurations should give a connection ``` client -> jump3 -> jump2 -> jump1 -> target ``` but I think they give ``` client -> jump1 -> jump2 -> jump3 -> target ``` ? Also: what if `host` at line 690 is again a chain (multiple hosts separated by commas)? As in the config ``` Host jump1 Hostname jump1.corp Port 22 User nightman ProxyJump jump2,jump3 LogLevel QUIET Host jump2 HostName jump2.dmz.corp Port 22 User nightman #ProxyJump jump3 LogLevel QUIET Host jump3 HostName jump3.dmz.corp Port 22 User nightman LogLevel QUIET Host host*.dmz.corp ProxyJump jump1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org