Using OS X 10.11.1 I'm hoping to run a setup where my SSH keys are adding using ssh-add -c
and when the ssh agent is requested to use a particular key I receive a dialog asking for permissions (i.e. ssh-askpass).
I'm unable to get anything other then keys adding via ssh-add -c
just not seeming to work at all. I can add the key and confirm the key is added via ssh-add -l
, but when I go to connect to a host I eventually end up a password authentication.
I've installed XQuartz and have a DISPLAY env var set, as well as having tried setting the SSH_ASKPASS env var with a path to an executable applicable for that. The executable doesn't seem to be being executed when I attempt the ssh connection though.
I've tried a few rounds of killing ssh-agent and re-adding keys with the env vars set with no luck.
Using iTerm2 rather than Terminal. No issues with ssh-agent aside for keys added using the confirmation argument
Narrowed down the issue to ssh-agent not reading either DISPLAY or SSH_ASKPASS env vars. If I kill the existing process and start it manually everything works successfully. Attempted to modify the LaunchAgent (after disabling SIP) with no success no (will keep at that).
The use case is wanting ssh to ask to use my key in a situation where ForwardAgent is globally enabled without the security implications of just globally enabling ForwardAgent (compromised hosts, etc).
– James Nov 19 '15 at 21:29