From b03248a3b3cb918ad1b25cf978bfa78f9c09c8d0 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Wed, 23 Mar 2022 14:04:33 +0100 Subject: $SSH_AUTH_SOCK only on the admin stations --- .bash/vars.bash | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.bash/vars.bash b/.bash/vars.bash index cb124be..088e1e9 100644 --- a/.bash/vars.bash +++ b/.bash/vars.bash @@ -9,8 +9,6 @@ export SCRSHDIR="${HOME}/Pictures" export SSHHOME="${HOME}/.ssh" # 1. key files, array: SSHKEYS=( "${SSHHOME}/id_ed25519" "${SSHHOME}/id_rsa" ) -# 2. SSH environment file -export SSHENVFILE="${HOME}/.ssh/sshenv" # 3. Hosts on which ssh-agent should run, FQDN. Array. # Typically, "hosts" will equal your workstations. See ssh_config(5) (esp. ForwardAgent) # Interpreted by fgrep / grep -F. @@ -81,3 +79,13 @@ export LIBVIRT_DEFAULT_URI="qemu:///system" if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi + +if [ -r "vars.bash.local" ];then + source vars.bash.local +fi +# SSH environment file +#!/usr/bin/env bash +# vim:syntax=sh +if echo "${SSHAGH[@]}" | fgrep --word-regexp "$(hostname -f)" > /dev/null;then + export SSHENVFILE="${HOME}/.ssh/sshenv" +fi -- cgit v1.2.3