Skip to content

Navigation Menu

Sign in
Sign up

Do not set by default SSH port when using Net::OpenSSH (fix: 1495) - #1496

Open
nfetisov wants to merge 1 commit into
RexOps:master from
nfetisov:ssh_port-1495
Open

Do not set by default SSH port when using Net::OpenSSH (fix: 1495) #1496
nfetisov wants to merge 1 commit into
RexOps:master from
nfetisov:ssh_port-1495

Conversation

@nfetisov

@nfetisov nfetisov commented Jun 22, 2021

Copy link
Copy Markdown

(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).

(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).

@ferki ferki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

This PR does not fully follow the project's expectations, so I'd like to take this chance to kindly link our Contributing guide, specifically the section about GitHub issues and pull requests.

Please follow the pull request template to provide all expected information either by editing the opening post here, or by opening a new pull request instead of this one.


This PR seems to be missing an expected changelog entry, and also failed the automated tests.

The changes here are overall on the right track towards letting Net::OpenSSH directly use the ssh config from outside Rex (as, IMHO, it always should have been). As commented on the related issue, it's only a part of the full picture, so I'd say it's unlikely that we would be able to merge it in its current form.

I'll keep this open a bit more for reference, probably until I come up with a more complete solution of the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ferki ferki ferki requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /