A one-liner to connect to a server (eg, [email protected]):
ssh -o "RequestTTY force" [email protected] -- tmux new -A -s defaultExplanation:
-o "RequestTTY force"will prevent the "not a terminal" error when running tmux tmis way--separates arguments for SSH and arguments to be passed as the initial comamndtmux new -A -s defaultwill attach to a running "default" session, or start it if it's not running yet