cli
cli copied to clipboard
Add --confirm flag to require agent confirmation
This PR adds a new --confirm flag to step ssh login, step ssh proxycommand, and step ssh certificate.
Solve https://github.com/smallstep/cli/issues/1611
When used, this flag adds the generated SSH certificate to the agent with the 'confirmation required' bit set, requiring user interaction (typically a prompt from the SSH agent) for every use of the key.
Changes:
- Added
WithConfirmBeforeUseAgentOption ininternal/sshutil. - Updated
Agent.AddCertificateto support the new option. - Added the
--confirmflag to relevant SSH commands. - Added unit tests for the new option handling.