aboutsummaryrefslogtreecommitdiff
path: root/content/blog/miscellaneous/reusing-ssh-connections.md
diff options
context:
space:
mode:
authorJulien Dessaux2021-03-19 23:39:19 +0100
committerJulien Dessaux2021-03-19 23:39:19 +0100
commit80c6fffa7149f4ea96f0a5e0e71121d9def70118 (patch)
tree1147c33cd5ec8a4882cf1a2cf627c4a62576ea2c /content/blog/miscellaneous/reusing-ssh-connections.md
parentRewording (diff)
downloadwww-80c6fffa7149f4ea96f0a5e0e71121d9def70118.tar.gz
www-80c6fffa7149f4ea96f0a5e0e71121d9def70118.tar.bz2
www-80c6fffa7149f4ea96f0a5e0e71121d9def70118.zip
Continued importing some old wiki content
Diffstat (limited to 'content/blog/miscellaneous/reusing-ssh-connections.md')
-rw-r--r--content/blog/miscellaneous/reusing-ssh-connections.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/content/blog/miscellaneous/reusing-ssh-connections.md b/content/blog/miscellaneous/reusing-ssh-connections.md
new file mode 100644
index 0000000..496f456
--- /dev/null
+++ b/content/blog/miscellaneous/reusing-ssh-connections.md
@@ -0,0 +1,19 @@
+---
+title: Reusing ssh connections
+date: 2020-02-05
+description: How to speed up opening multiple ssh to a single host
+tags:
+ - toolbox
+---
+
+## Introduction
+
+It is possible to share multiple sessions over a single connection. One of the advantages is that for the duration of the connection, all new sessions open very fast.
+
+## How to
+
+You need a directory to store the sockets for the opened sessions, I use the `~/.ssh/tmp` directory for it. Whatever you choose, make sure it exists by running `mkdir` now. Then add these two lines at the start of your `~/.ssh/config` :
+{{< highlight sh >}}
+ControlMaster auto
+ControlPath ~/.ssh/tmp/%h_%p_%r
+{{< /highlight >}}