diff --git a/.local/share/gnupg/gpg-agent.conf b/.local/share/gnupg/gpg-agent.conf index d4337995..80e2992c 100644 --- a/.local/share/gnupg/gpg-agent.conf +++ b/.local/share/gnupg/gpg-agent.conf @@ -1,3 +1,4 @@ allow-preset-passphrase max-cache-ttl 172800 enable-ssh-support +max-cache-ttl-ssh 86400 diff --git a/.profile b/.profile index 45d077f8..4c13ca49 100755 --- a/.profile +++ b/.profile @@ -84,8 +84,8 @@ esac # Setup SSH if [ ! "$SSH_AUTH_SOCK" ]; then - echo UPDATESTARTUPTTY | gpg-connect-agent 2> /dev/null > /dev/null - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + eval "$(ssh-agent | head -n 2)" + grep -slR "PRIVATE" ~/.ssh/ | xargs ssh-add > /dev/null 2> /dev/null fi # Start xinit if logged in from tty1