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

remote: fix ssh_config handling #24568

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Nov 14, 2024

Fixes: #24567

Does this PR introduce a user-facing change?

Fixes podman remote connection issue with certain ssh_config settings.

The new ssh_Config feature doesn't work on my system because the lib
fails to parse configs using Match[1]. However Fedora and RHEL based
distros seem to ship /etc/ssh/ssh_config.d/50-redhat.conf which contains
a Match line thus it always fails to parse and never uses the proper
values from my home dir config.

[1] kevinburke/ssh_config#6

Signed-off-by: Paul Holzinger <[email protected]>
Copy link
Contributor

openshift-ci bot commented Nov 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2024
When we alreadty get a full URL with user, port and identity then we
should not read the config file just to overwrite them with wrong
values. This is a bad regression for user using * wildcard in their
ssh_config as it makes podman machine unusable.

Fixes: containers#24567
Fixes: e523734 ("Add support for ssh_config for connection")

Signed-off-by: Paul Holzinger <[email protected]>
The ssh_config can contain a path with ~/ to refer to the home dir like
done on shells. Handle that special case and resolve the path correctly
so it can be used.

Signed-off-by: Paul Holzinger <[email protected]>
For machine we know we have all the info we need so there is no reason
to read and parse another file.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented Nov 14, 2024

@mheon @baude PTAL This fixes a common regression with remote/podman machine connections.

@mheon
Copy link
Member

mheon commented Nov 14, 2024

/cherry-pick v5.3
LGTM

@openshift-cherrypick-robot
Copy link
Collaborator

@mheon: once the present PR merges, I will cherry-pick it on top of v5.3 in a new PR and assign it to you.

In response to this:

/cherry-pick v5.3
LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Luap99 Luap99 added the 5.3 label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.3 approved Indicates a PR has been approved by an approver from all required OWNERS files. machine release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Users may need to ignore 127.0.0.1 in SSH config to use Podman 5.3
3 participants