Named sessions

Typically, tmate generates random connection strings which are not stable across restarts, like ssh vbBK63dtemNN2ppDUqSvYNqbD@nyc1.tmate.io . This can be a problem for accessing remote machines. One way to deal with connection string instability is to use tmate Webhooks, but this requires some effort to integrate.

Another way is to use named sessions: by specifying a session name, the connection string becomes ssh username/session-name@nyc1.tmate.io which is deterministic. The username is specified when registering for an API key (see below) and the session name is specified as follows:

From the CLI: tmate -k API_KEY -n session-name

Or from the ~/.tmate.conf file: set tmate-api-key "API_KEY" set tmate-session-name "session-name"

It is possible put the API key in the tmate configuration file, and specify the session name on the CLI.

To specify the read-only session name, you may use the CLI option -r , or the configuration option tmate-session-name-ro .

If you get the error illegal option -- n , ensure you are running tmate greater than 2.4.0. You can check what tmate version you have by running: tmate -V . If your tmate version is too old, scroll up to the installation section.

Warning: access control must be considered when using named sessions, see next section.

Fill the following form to get an API key and start naming your sessions