From 63c7606706cca46e64faff36167b62efff1f5ae1 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 17 Apr 2020 03:08:40 +0200 Subject: [PATCH] maintain persistent ssh auth sock --- .gitignore.d/ssh | 1 + .ssh/rc | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 .ssh/rc diff --git a/.gitignore.d/ssh b/.gitignore.d/ssh index ab20bac..05142ef 100644 --- a/.gitignore.d/ssh +++ b/.gitignore.d/ssh @@ -29,6 +29,7 @@ !/.ssh/known_hosts.d/tilde-club !/.ssh/known_hosts.d/viinet.de !/.ssh/Makefile +!/.ssh/rc !/.var/ssh/.gitignore !/.xsession.d/20-ssh-ask-passphrase !/.zsh/zshrc/parts.d/50-ssh diff --git a/.ssh/rc b/.ssh/rc new file mode 100644 index 0000000..a70d65c --- /dev/null +++ b/.ssh/rc @@ -0,0 +1,5 @@ +PERSISTENT_AUTH_SOCK=$VARDIR/ssh/persistent-ssh-auth.sock + +if [ ! -S "$PERSISTENT_AUTH_SOCK" ] && [ -S "$SSH_AUTH_SOCK" ]; then + ln -sf "$SSH_AUTH_SOCK" "$PERSISTENT_AUTH_SOCK" +fi -- 2.39.5