tmux Remote Sessions, SSH, and Pairing/Start or attach after SSH login

Create-or-attach workflow for remote boxes.

Section: Remote persistence

Start or attach after SSH login

bash
bash
tmux new-session -A -s remote
Explanation

`-A` attaches if the session exists and creates it otherwise.

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 Remote persistence
Detach another client
Detach a specific attached client.
OpenIn sheetbashsame section
List connected clients
See who is attached and where from.
OpenIn sheetbashsame section
Lock a session
Require unlocking before use.
OpenIn sheetbashsame section
Attach a read-only client
Observe a session without sending input.
OpenIn sheetbash1 tag match
Enable broadcast for paired commands
Send the same input to multiple panes in a window.
OpenIn sheetbash1 tag match
Disable broadcast again
Turn off synchronized typing.
OpenIn sheetbash1 tag match