aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2021-07-15 14:01:52 -0500
committerToby Vincent <tobyv13@gmail.com>2021-07-15 14:01:52 -0500
commitcd7508006e808182a864564eac0e0380bfcdd56a (patch)
tree26f95de2c085678fc13bde256a50b2c701e6f23b
parent889ceedeb786679c507cadd61e6c5ed20114b08b (diff)
feat: added ssh ControlMaster to persist connections
-rw-r--r--ssh/config3
-rwxr-xr-xwsl.install2
2 files changed, 4 insertions, 1 deletions
diff --git a/ssh/config b/ssh/config
index 752ac9e..c9e51e8 100644
--- a/ssh/config
+++ b/ssh/config
@@ -2,6 +2,9 @@
Host *
StrictHostKeyChecking no
+ ControlMaster auto
+ ControlPath ~/.ssh/control-%h-%p-%r
+ ControlPersist yes
Host heimdall loki
User pi
diff --git a/wsl.install b/wsl.install
index 6f46bca..4113a17 100755
--- a/wsl.install
+++ b/wsl.install
@@ -28,7 +28,7 @@ ln -sf $WINHOME ~/win
# ssh-config
sed -r 's|(RemoteForward\s+.+\s+)\/home\/tobyv\/\.gnupg\/S\.gpg-agent\.extra|\1127.0.0.1:4444|' \
- ${DOTFILES}/ssh/config >${DOTFILES}/ssh/win.config
+ ${DOTFILES}/ssh/config | sed '/Control/d' >${DOTFILES}/ssh/win.config
# Create windows symlinks to dotfiles
$mkln ssh/win.config ~/win/.ssh/config