From c86f4477e70d890660aac68fba6721dec725962f Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Mon, 21 Mar 2022 11:21:48 +0100 Subject: Execute ssh agent only on machines we want to be the source Also, see ssh_config(5) and ForwardAgent --- .bash/exec.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.bash/exec.bash') diff --git a/.bash/exec.bash b/.bash/exec.bash index a239d5e..ffbeaae 100644 --- a/.bash/exec.bash +++ b/.bash/exec.bash @@ -7,7 +7,9 @@ set bell-style visible # start ssh agent. this script will not try to run a new instance # (unless we specified -f, which we don't). -"$HOME/bin/ssh-agent-launcher" -q +if echo "${SSHAGH[@]}" | fgrep --word-regexp "$(hostname -f)";then + "$HOME/bin/ssh-agent-launcher" -q +fi # because on some hosts the login path is fucked, unset in .local # if it causes irritation: -- cgit v1.2.3