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

ssh: add --bastion-user-known-hosts-file flag #285

Merged
merged 4 commits into from
May 5, 2023

Conversation

petersutter
Copy link
Member

What this PR does / why we need it:
This PR adds a --bastion-user-known-hosts-file flag to the ssh command, allowing users to specify a custom known hosts file for the SSH connection to the bastion host.
This is useful when the bastion host IP is reused, which can lead to a failed remote host key verification if there is an existing entry for the same IP but from a previous (old) bastion.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Related issue #225

Release note:

`ssh`: Use the `--bastion-user-known-hosts-file` flag to specify a custom known hosts file for the SSH connection to the bastion host. This is useful when the bastion host IP is reused, which can lead to a failed remote host key verification if there is an existing entry for the same IP but from a previous (old) bastion.

@petersutter petersutter added area/ipcei IPCEI (Important Project of Common European Interest) stacked labels May 3, 2023
@petersutter petersutter requested a review from a team as a code owner May 3, 2023 11:51
@gardener-robot gardener-robot added needs/review Needs review size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) labels May 3, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 3, 2023
pkg/cmd/ssh/options.go Outdated Show resolved Hide resolved
Base automatically changed from enh/ssh/bastion-host-and-port to master May 4, 2023 17:05
@gardener-robot gardener-robot added the needs/rebase Needs git rebase label May 4, 2023
@gardener-robot
Copy link

@petersutter You need rebase this pull request with latest master branch. Please check.

@petersutter petersutter force-pushed the enh/bastion/user-known-hosts-files branch from be4115f to 5b81847 Compare May 4, 2023 17:05
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 4, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 4, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 4, 2023
@petersutter petersutter force-pushed the enh/bastion/user-known-hosts-files branch from 9726937 to 41253ae Compare May 4, 2023 17:14
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 4, 2023
Copy link
Member

@holgerkoser holgerkoser left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/rebase Needs git rebase needs/review Needs review labels May 4, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 4, 2023
Copy link
Contributor

@grolu grolu left a comment

Choose a reason for hiding this comment

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

/lgtm

@petersutter petersutter merged commit e9baa71 into master May 5, 2023
@petersutter petersutter deleted the enh/bastion/user-known-hosts-files branch May 5, 2023 08:31
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei IPCEI (Important Project of Common European Interest) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants