Master SSH connection efficiency with 'ControlMaster auto'

Just add these two lines to your ~/.ssh/config and you’re good to go!

1
2
3
4
Host ...
...
ControlMaster auto
ControlPath ~/.ssh/control:%h:%p:%r

Adding those two line at the end of the Host config in ~/.ssh/config will make it
so you can make new connections to the same host without needing to type a password.
This is very helpful in the instance that you have some kind of dual factor authentication
for accessing a system, and it takes too much time to authenticate every time.

Get new posts by email:

Comments

Hint: To type code with Disqus, use
<code><pre>insert.code.here()<pre/><code/>
2024-04-25