by dnlk · 14y ago · 0 comments
Enter the ControlMaster mechanism (see man ssh_config):
Host *
ControlMaster auto
ControlPersist yes
ControlPath /tmp/ssh-%r@%h:%p
ServerAliveInterval 600
So now you type in your password for your first session only, and every other session will be slaved to it (this includes directory/file auto completion over ssh in zsh and other nice nibbles like it does with public/private key pairs).ControlMaster's biggest advantage is using a single encryption channel for multiple connections. Especially handy if you need to jumphost through a vpn machine.