diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-07-04 15:39:44 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-07-04 15:42:19 +0200 |
commit | 18dbadf1a02b797acb4a99b2670b022462664dd3 (patch) | |
tree | 70fbe2b3e7cd0eee845c05eb860b098fb47fd339 /bin/ssh_sk_clean | |
parent | cbebddb1e856c74887cefeae03566b73fb19c1f3 (diff) |
Add more verbosity to FIDO key loading/cleaning
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 |