check for SSH_CONNECTION var (ty tmux)

master
Paul Walko 2019-12-05 19:01:55 +01:00
parent ee1e80fc3b
commit b4c6358390
1 changed files with 2 additions and 2 deletions

4
zshrc
View File

@ -35,8 +35,8 @@ fi
# GPG/SSH # GPG/SSH
## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon ## Void: Install pcsclite, pcsc-ccid, gnupg2-scdaemon
## Yubico openpgp: https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp ## Yubico openpgp: https://support.yubico.com/support/solutions/articles/15000006420-using-your-yubikey-with-openpgp
# Run if NOT ssh session # Run if ALL variables are not set
if [ -z "$SSH_CLIENT" ] || [ -z "$SSH_TTY" ]; then if [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
if [[ "$OSTYPE" == 'darwin'* ]]; then if [[ "$OSTYPE" == 'darwin'* ]]; then
eval `ssh-agent` eval `ssh-agent`
ssh-add -t 48h -s $OPENSC_LIBS/opensc-pkcs11.so ssh-add -t 48h -s $OPENSC_LIBS/opensc-pkcs11.so