Use KeePassXC as the ssh-agent key provider

This commit is contained in:
Felix Buehler 2019-06-26 19:39:45 +02:00
parent f4e2316a1a
commit 56936808d4
2 changed files with 5 additions and 10 deletions

View file

@ -1,12 +1,7 @@
#!/bin/sh
# array to process, either folders or directories for recursive processing
KEYPATHS+=("$HOME/.ssh")
#!/usr/bin/env bash
# Assert an ssh-agent (which is empty at the beginning)
if command -v keychain 2>&1 >/dev/null; then
eval \
"$(find "${KEYPATHS[@]}" -type f -name '*.pub' 2>/dev/null \
| sed 's/.pub$//' \
| xargs keychain -q --nogui --agents ssh --timeout 600 --eval)"
eval $(keychain -q --nogui --agents ssh --timeout 600 --eval)
fi
unset KEYPATHS

View file

@ -80,7 +80,7 @@ focus_follows_mouse no
bindsym $mod+Tab workspace next
bindsym Shift+$mod+Tab workspace prev
bindsym $mod+m exec eval $(keychain -q --nogui --agents ssh --timeout 600 --eval) && keepassxc
bindsym $mod+m exec . ~/.profile.d/90-keychain.sh && keepassxc
bindsym $mod+e exec subl3
bindsym $mod+w exec firefox
bindsym $mod+u exec feedreader