diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ssh_sk_add | 8 | ||||
-rwxr-xr-x | bin/ssh_sk_clean | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/bin/ssh_sk_add b/bin/ssh_sk_add new file mode 100755 index 0000000..24079e4 --- /dev/null +++ b/bin/ssh_sk_add @@ -0,0 +1,8 @@ +#!/bin/sh +# load resident keys from a FIDO authenticator to the SSH agent +output=$(ssh-add -K 2>&1) +if [ $? -eq 0 ]; then + notify-send -u low "FIDO keys loaded" "${output}" +else + notify-send -u critical "Error adding FIDO2 keys to SSH agent" "${err_output}" +fi diff --git a/bin/ssh_sk_clean b/bin/ssh_sk_clean index 1f32658..22edc24 100755 --- a/bin/ssh_sk_clean +++ b/bin/ssh_sk_clean @@ -2,5 +2,10 @@ # remove all FIDO keys from the SSH agent fido_keys=$(ssh-add -L|grep '^sk-') if [ -n "${fido_keys}" ]; then - echo "${fido_keys}" | ssh-add -d /dev/stdin + output=$(echo "${fido_keys}" | ssh-add -d /dev/stdin 2>&1) + if [ $? -eq 0 ]; then + notify-send -u low "FIDO keys cleaned" + else + notify-send -u critical "FIDO keys not cleaned" "${output}" + fi fi |