git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.bash/exec.bash
diff options
context:
space:
mode:
authormail_redacted_for_web 2022-03-21 11:21:48 +0100
committermail_redacted_for_web 2022-03-21 11:21:48 +0100
commitc86f4477e70d890660aac68fba6721dec725962f (patch)
treeb56a283268be9ba1f21d4da9c9745deb844df3a0 /.bash/exec.bash
parent1475a69efda4e05b559d7868020f3c0d0f599cb4 (diff)
downloaddotfiles-c86f4477e70d890660aac68fba6721dec725962f.tar.bz2
Execute ssh agent only on machines we want to be the source
Also, see ssh_config(5) and ForwardAgent
Diffstat (limited to '.bash/exec.bash')
-rw-r--r--.bash/exec.bash4
1 files changed, 3 insertions, 1 deletions
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: