diff options
Diffstat (limited to 'bin/ssh_sk_clean')
-rwxr-xr-x | bin/ssh_sk_clean | 7 |
1 files changed, 6 insertions, 1 deletions
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 |