Difference between revisions of "SSH Multiplexing"
Jump to navigation
Jump to search
Moskalenko (talk | contribs) (Created page with "If your workflow involves making a lot of connections to HiPerGator you may want to use SSH Multiplexing to avoid having to go through MFA for every connection. In a nutshel...") |
Moskalenko (talk | contribs) |
||
Line 12: | Line 12: | ||
Port 2222 | Port 2222 | ||
ForwardAgent yes | ForwardAgent yes | ||
− | ControlPath ~/.ssh/cm-%r@%h:%p | + | ControlPath ~/.ssh/cm-%r@%l-%h:%p |
ControlMaster auto | ControlMaster auto | ||
ControlPersist 8h | ControlPersist 8h | ||
If you use username and password remove the 'Port 2222' line from configuration. | If you use username and password remove the 'Port 2222' line from configuration. |
Revision as of 13:41, 18 October 2021
If your workflow involves making a lot of connections to HiPerGator you may want to use SSH Multiplexing to avoid having to go through MFA for every connection.
In a nutshell, ssh multiplexing works by creating a TCP socket the first time a connection is made. That socket can be used by subsequent connections within the idle timeout period to create new connections without triggering MFA.
See [1] for reference.
Example with SSH key authentication that enables SSH multiplexing. Each subsequent connection resets the idle timeout countdown:
Host hpg User albertgator HostName hpg.rc.ufl.edu Port 2222 ForwardAgent yes ControlPath ~/.ssh/cm-%r@%l-%h:%p ControlMaster auto ControlPersist 8h If you use username and password remove the 'Port 2222' line from configuration.