SSH Cheat Sheet/Start a master connection

Open a reusable control connection for later sessions.

Section: Connection Multiplexing

Start a master connection

bash
bash
ssh -M -S ~/.ssh/cm-%r@%h:%p user@example.com
Explanation

Open a reusable control connection for later sessions.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Connection Multiplexing
Enable connection persistence
Keep a master connection alive in the background.
OpenIn sheetbashsame section
Check a master connection
Query an existing multiplexed master socket.
OpenIn sheetbashsame section
Stop a master connection
Shut down a background master socket cleanly.
OpenIn sheetbashsame section
Request forwarding changes on master
Add or adjust forwarding via an existing master connection.
OpenIn sheetbashsame section
Connect to a host
Open an interactive SSH session.
OpenIn sheetbash1 tag match
Use a specific private key
Choose a private key explicitly.
OpenIn sheetbash1 tag match