- #!/bin/sh
- /bin/tmate -S /tmp/tmate.sock new-session -d # Launch tmate in a detached state
- /usr/bin/timeout -t 20 /bin/tmate -S /tmp/tmate.sock wait tmate-ready # Blocks until the SSH connection is established
- /bin/tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' # Prints the SSH connection string
|