Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

Adding key with confirmation option to ssh-agent gives "agent refused operation"

Open wondering639 opened this issue 1 year ago • 3 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

Try adding a key with the -c (confirmation) option, it will fail with "agent refused operation"

PS C:\Users\myuser> ssh-add -c $env:USERPROFILE/.ssh/mykey
Enter passphrase for C:\Users\myuser/.ssh/mykey (will confirm each use):
Could not add identity "C:\Users\myuser/.ssh/mykey": agent refused operation

Expected behavior

ssh agent should not refuse this operation (-> it should support it)

Actual behavior

buggy or likely not supported at all, even though the option is there on ssh-add?

Error details

No response

Environment data

not relevant

Version

OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

Visuals

No response

wondering639 avatar Dec 07 '24 14:12 wondering639

-c relies on ssh-askpass, which does not have a direct Windows equivalent, so this is not supported currently. We can improve the error message to make this clearer.

tgauth avatar Dec 09 '24 19:12 tgauth

-c relies on ssh-askpass, which does not have a direct Windows equivalent, so this is not supported currently. We can improve the error message to make this clearer.

thanks, improving the error message would be a good first usability improvement, but what about adding a ssh-askpass equivalent for Windows? That would give improved security, can that be noted as a feature request?

wondering639 avatar Dec 14 '24 22:12 wondering639

Support for ssh-add -c and ssh-add -t should be added. This lowers the level of security.

psztoch avatar Mar 20 '25 13:03 psztoch