diff options
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 } |