cli: Add Explicit key selection#949
Conversation
Adds a --ssh-id CLI flag to select an exact SSH private key path. This sets the internal `SSHID` variable (`etcd/ssh/ssh.go`), which was previously not exposed directly. With an unset/empty `SSHID` we collect SSH client signers only by scanning the default SSH directory for `id_*` private keys. This change exposes the existing `SSHID` field as an explicit single-key alternative. Why this was needed: - My PK files are not neccessarily under ~/.ssh - The current scan does not respect a custom HOME override ExpandHome ends up using the actual user home setting via os.user
31ece9d to
6e1b430
Compare
|
If LLM/AI was used in this commit, it must be disclosed. Please confirm, and thank you. |
|
Otherwise, patch LGTM, except you may wish to also plumb things through in lang/core/embedded/provisioner/main.mcl Look for Thanks! |
Both commits were written by me, without AI this time. I've added the new flag to the embedded provisioner module code. Although they're really just going to be empty for now. Until the module code does anything fancy, like allowing to install a custom private key on the new host instead of auto-generating it. |
|
I've squashed and reflowed the commit message and merged! Thank you. |
Adds a --ssh-id CLI flag to select an exact SSH private key path.
This sets the internal
SSHIDvariable (etcd/ssh/ssh.go), which was previously not exposed directly.With an unset/empty
SSHIDwe collect SSH client signers only by scanning the default SSH directory forid_*private keys.This change exposes the existing
SSHIDfield as an explicit single-key alternative.Why this was needed:
ExpandHome ends up using the actual user home setting via os.user