Create a new tmux session called 'main' if there is no existing session called 'main', otherwise attach to the existing 'main' session.
From an answer on https://unix.stackexchange.com/questions/103898/how-to-start-tmux-with-attach-if-a-session-exists
Add a -t
switch to the ssh
command for the profile. Works for me ssh'ing to an Ubuntu 18.04 host.
ssh -t <hostname> tmux new-session -A -s main
Enter the following as the command in the General tab of the profile.
tmux new-session -A -s main