SSH Connection Sharing
If you’re like me, you open a lot of different terminal sessions throughout your day. When it comes to SSH, I want these different sessions to share a connection rather than creating a new one each time.
To accomplish this, I have the following in my
ControlMaster auto ControlPersist no ControlPath ~/.ssh/sockets/socket-%r@%h:%p
||Allows connection sharing|
||Where to store connection information. This should not be writable by other users.|
You’ll also need to create the
sockets folder if you don’t have it already setup.
mkdir ~/.ssh/sockets chmod go-w ~/.ssh/sockets