diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2019-03-25 21:12:11 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2019-03-25 21:12:11 -0300 |
commit | 454f5f152c9db76d3d43ce88ac11b81025564a08 (patch) | |
tree | 8434421f54921e9f98627a04b13e9531d58fa60a /ssh-agent-loadkey-menu | |
parent | 74e28743f7021e3db39eaa3d81afa9eaff710ad6 (diff) | |
download | utils-ssh-454f5f152c9db76d3d43ce88ac11b81025564a08.tar.gz utils-ssh-454f5f152c9db76d3d43ce88ac11b81025564a08.tar.bz2 |
Adds askpass support into ssh-agent-loadkey
Diffstat (limited to 'ssh-agent-loadkey-menu')
-rwxr-xr-x | ssh-agent-loadkey-menu | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ssh-agent-loadkey-menu b/ssh-agent-loadkey-menu index 6029729..7640032 100755 --- a/ssh-agent-loadkey-menu +++ b/ssh-agent-loadkey-menu @@ -59,12 +59,14 @@ function __chooser { # Load a key function __load { + KEY="$KEYS/$1" + # Check if the selected option has a custom procedure (monkeysphere, keyringer, etc) - if [ -x "$KEYS/$1.askpass" ]; then + if [ -x "$KEY.askpass" ]; then # SSH-ADD(1) says: "Note that on some machines it may be necessary to redirect the input from /dev/null to make this work". - SSH_ASKPASS="$KEYS/$1.askpass" ssh-add $HOME/.ssh/keys/$1 < /dev/null + SSH_ASKPASS="$KEYS.askpass" ssh-add $KEY < /dev/null else - ssh-add $HOME/.ssh/keys/$1 + ssh-add $KEY fi } |