5 ms·
To speed up ssh login time, try adding the following to your ~/.ssh/config: Host * ControlMaster auto ControlPath ~/.ssh/auth/%r@%h:%p ControlPer
by jewel 14y ago
To speed up ssh login time, try adding the following to your ~/.ssh/config:
Host *
ControlMaster auto
ControlPath ~/.ssh/auth/%r@%h:%p
ControlPersist yes
For me this changes connection times from 1.7 seconds to 0.189 seconds when connecting to a host over the internet.
- mintplant 14y agoWhat does this do?
- _djo_ 14y agoMaintains a persistent ssh connection to each host once the first is created. Any subsequent ssh commands will be sent over the existing channel, skipping the time-consuming handshake process.
- gingerlime 14y agoInteresting tip. Thanks! Note that you might need to create the auth subfolder using `mkdir ~/.ssh/auth`, otherwise it might throw an error on connection: `muxserver_listen bind(): No such file or directory`