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

[Bug]: step ssh config with contexts adds snippet including the wrong file #990

Open
cholyoak opened this issue Jul 25, 2023 · 0 comments
Open
Assignees
Labels
bug needs triage Waiting for discussion / prioritization by team
Milestone

Comments

@cholyoak
Copy link

Steps to Reproduce

Run step ssh config to configure an SSH client. When the CA is configured without contexts it adds a snippet to ~/.ssh/config:

Host *
  Include "$HOME/.step/ssh/includes"

and then creates this file at $HOME/.step/ssh/includes. But when the CA is configured with a context the snippet is the same, but the file actually created is at $HOME/.step/authorities/<ca>/ssh/config.

The snippet template (unchanged from the default) includes:

Include "{{.User.StepPath}}/ssh/config"

When using contexts the .User.StepPath ought to be updated to the correct file path, or other relevant variables be made to the templates so they can insert the right value.

Your Environment

  • OS - Linux (Debian Bullseye)
  • step CLI Version - 0.24.4

Expected Behavior

The snippet in $HOME/.step/ssh/includes should include the authority relevant path when using contexts, like:

Include "$HOME/.step/authorities/<ca name>/ssh/config"

Actual Behavior

The snippet in $HOME/.step/ssh/includes includes the standard path, like:

Include "$HOME/.step/ssh/config"

Additional Context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@cholyoak cholyoak added bug needs triage Waiting for discussion / prioritization by team labels Jul 25, 2023
@hslatman hslatman added this to the v0.24.5 milestone Aug 1, 2023
@maraino maraino modified the milestones: v0.25.0, v0.25.1 Sep 27, 2023
@hslatman hslatman modified the milestones: v0.25.1, v0.25.2 Nov 29, 2023
@hslatman hslatman modified the milestones: v0.25.2, v0.25.3 Feb 20, 2024
@hslatman hslatman modified the milestones: v0.26.0, v0.26.1 Mar 29, 2024
@hslatman hslatman modified the milestones: v0.26.1, v0.26.2 Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

No branches or pull requests

4 participants