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 - Default user known hosts file #476

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

petersutter
Copy link
Member

@petersutter petersutter commented Nov 8, 2024

What this PR does / why we need it:

This PR sets default paths for known_hosts files for SSH connections to bastions and shoot nodes when none are provided, reducing host key conflicts from IP reuse and keeping the user's default SSH known_hosts file (~/.ssh/known_hosts) clean.

  • --bastion-user-known-hosts-file default: <temp_dir>/garden/cache/<bastion_uid>/.ssh/known_hosts
  • --node-user-known-hosts-file default: <garden_home_dir>/cache/<shoot_uid>/.ssh/known_hosts

Release note:

`ssh`: Default paths for `known_hosts` files are set for bastions and shoot nodes. Bastion keys are stored in temporary directories, while shoot node keys persist in the garden home directory.
The session directory has been moved to a `sessions` subfolder, changing from `<temp_dir>/garden/<session_id>` to `<temp_dir>/garden/sessions/<session_id>`. The current session will be migrated on the next run of a `gardenctl` command.

@petersutter petersutter requested a review from a team as a code owner November 8, 2024 15:57
@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 Nov 8, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 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 Nov 8, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 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 Nov 8, 2024
@petersutter petersutter force-pushed the default-user-known-hosts branch from 6967837 to 6b0a566 Compare November 8, 2024 16:02
@petersutter petersutter changed the title ssh - Default user known hosts file ssh - Default user known hosts file Nov 8, 2024
@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 Nov 8, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 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 Nov 8, 2024
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

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Nov 25, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 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 Nov 25, 2024
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

@petersutter petersutter 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 needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 26, 2024
@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 Nov 26, 2024
@petersutter petersutter merged commit 18f6ad6 into master Nov 26, 2024
7 checks passed
@petersutter petersutter deleted the default-user-known-hosts branch November 26, 2024 09:47
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 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