cli icon indicating copy to clipboard operation
cli copied to clipboard

"command not found: step" on every ssh session start

Open FallingSnow opened this issue 3 years ago • 2 comments

Subject of the issue

Took me a while to figure out why this was happening. I don't know what caused it to add this to my ssh config either. I deleted the config entry in question already but is was an include that had been autogenerated into my $HOME/ssh/config. Note: step is called via step-cli on Arch Linux.

$ ssh hi
zsh:1: command not found: step
ssh: Could not resolve hostname hi: Name or service not known

Is this a package maintainer's issue?

Your environment

  • OS - Arch Linux
  • Version - Linux laptop 5.16.11-arch1-2.2 #1 SMP PREEMPT Thu, 03 Mar 2022 13:19:10 +0000 x86_64 GNU/Linux

Steps to reproduce

Not really sure what caused it. Might have been running step ssh config?

Expected behaviour

Not to see zsh:1: command not found: step every time I run ssh.

Actual behaviour

zsh:1: command not found: step appears every time I run ssh.

FallingSnow avatar Mar 24 '22 23:03 FallingSnow

We will need to change our templates to pass the binary name to them and adjust them accordingly, right now you can do one of these options should work:

  1. Manually edit $(step path)/ssh/config and replace step to step-cli
  2. If all the users are always using step-cli, you can also change the template in step-ca, when you configure a CA with step ca init --ssh new templates are added to $(step path)/templates/ssh/step_config.tpl and replace it for step-cli.
  3. It should be possible to edit the same templates and use a user-provided variable using step as default. So you can run for example step-cli ssh config --set StepBinary=step-cli

maraino avatar Mar 30 '22 19:03 maraino