SSH multiplexing (ControlMaster)
Reuse existing connection for subsequent SSH commands
ssh -o ControlMaster=auto -o ControlPath=~/.ssh/mux-%r@%h:%p -o ControlPersist=10m user@host
- tool
- ssh15 commands
- tags
- sshperformance
More ssh commands
-
ssh user@host 'sudo systemctl status nginx'Execute a command over SSH without interactive shell
-
scp -r -P 2222 ./dist/ user@host:/var/www/app/Recursive copy on non-standard port
-
ssh -A user@bastionForward local SSH agent to the remote host (use with caution)
-
eval $(ssh-agent) && ssh-add ~/.ssh/id_ed25519Start agent and load a key for the session
-
cat >> ~/.ssh/config <<'EOF' Host dev HostName 10.0.0.5 User ubuntu IdentityFile ~/.ssh/dev_key ProxyJump bastion EOFShorthand alias: 'ssh dev' triggers all options