We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ssh
1 parent ba40d69 commit 7e1f8bdCopy full SHA for 7e1f8bd
Local/scripts/tools/ssh-wrapper.sh
@@ -0,0 +1,18 @@
1
+#!/bin/sh
2
+# This script must be symlinked in PATH as ssh for it to work
3
+# You also need add UserKnownHostsFile in your ssh config to point to the
4
+# new path where the ssh config is located, for example:
5
+# UserKnownHostsFile ~/Local/config/ssh/known_hosts
6
+
7
+CURRENTDIR="$(cd "${0%/*}" && echo "$PWD")"
8
+CONFIGDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
9
10
+PATH="$(echo "$PATH" | sed "s|$CURRENTDIR:||g; s|:$CURRENTDIR||g")"
11
+export PATH
12
13
+if [ -f "$CONFIGDIR"/ssh/config ]; then
14
+ set -- "-F" "$CONFIGDIR/ssh/config" "$@"
15
+fi
16
17
+exec ssh "$@"
18
0 commit comments