From 529ef56f291a3c5db366211eade96a41f3eb7f11 Mon Sep 17 00:00:00 2001 From: Yigit Colakoglu Date: Sat, 10 Apr 2021 15:45:40 +0300 Subject: [PATCH] .profile ssh --- .local/share/gnupg/gpg-agent.conf | 1 + .profile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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