You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(R)?ex can't parse complex OpenSSH configuration file, i.e. with host templates, includes, etc.
Net::OpenSSH use OpenSSH library and handle complex .ssh/config right like OpenSSH itself.
So if (R)?ex can find port for SSH connection inside (simple plain) .ssh/config - let's use this port value,
and if it can't - do not force port to 22/tcp so Net::OpenSSH can try to find it by itself (or failover to the
same 22/tcp inside Net::OpenSSH).
This allows complex OpenSSH configs, and resolves related #1209 and #1229 and #1458 issues.
The text was updated successfully, but these errors were encountered:
Please follow the issue template to provide all expected information either by editing the opening post here, or by opening a new issue instead of this one.
It's a correct observation that we'd need to drop the default port value in Rex::Interface::Connection::OpenSSH while we work towards a solution for the overall goal of "don't interfere with ssh config parsing results in Rex when Net::OpenSSH is in use" story. It wouldn't solve the full story in itself, though.
The full picture of the puzzle contains a a few more pieces: add a feature flag to opt-in/out of the new behavior, restructure the code so it becomes testable, drop all default values for connection options (not just port), still ensure that Rex config is respected, etc.
I'd like to open another issue later which describes the overall situation better, and also groups the related issues together (including this one), and then address the root cause instead of just one of the symptoms (e.g. port handling).
(R)?ex can't parse complex OpenSSH configuration file, i.e. with host templates, includes, etc.
Net::OpenSSH use OpenSSH library and handle complex .ssh/config right like OpenSSH itself.
So if (R)?ex can find port for SSH connection inside (simple plain) .ssh/config - let's use this port value,
and if it can't - do not force port to 22/tcp so Net::OpenSSH can try to find it by itself (or failover to the
same 22/tcp inside Net::OpenSSH).
This allows complex OpenSSH configs, and resolves related #1209 and #1229 and #1458 issues.
The text was updated successfully, but these errors were encountered: