Token2Shell supports URI protocol schemes such as "ssh://" and "telnet://" for starting a session from external sources (ex. web browser, command line and etc.).

For example, when you enter the following from the Command Prompt, Token2Shell is launched (if it's not already running) and an SSH session is started for connecting to the host "192.168.1.101" with a user name "myid".

start ssh://myid@192.168.1.101

The following URI schemes are supported and they correspond to the connection types supported in Token2Shell.

Connection TypeURI Scheme
SSH ssh
t2ssh
  • ssh://userid{:password}@address{:port}{/?x11=display-location&exec=exec-bin-path}
  • {/?x11=display-location&exec=exec-bin-path} requires version 15.1.0 or higher
    • x11
      Force X11 forwarding if it's disabled in the default settings.
    • exec
      Execute the specified command.
TELNET telnet
t2telnet
TCP Direct tcp
t2tcp
Docker docker
t2docker
  • docker://{container-name}{/?tty=exec-bin-path}
    (ex. docker://web/?tty=/bin/bash)
  • If you omit the container name, Docker Console is opened.
Address Book entryt2ab
  • Must use 3 slashes for defining the path for the entry instead of usual 2 slashes
    (ex. t2ab:///folder path/entry-name)
  • If a URI ends with a slash (ex. t2ab:///folder-name/), it'll be interpreted as a folder path and the Address Book side-panel is opened.
  • Starting from version 15.1.0, you can also override SSH and Docker settings via URI query arguments.
    • SSH: {?x11=display-location&exec=exec-bin-path}
      ex. t2ab:///open-wsl-shell?x11=localhost:0.0&exec=/bin/bash
    • Docker: {?tty=exec-bin-path}
      ex. t2ab:///ubuntu-docker?tty=/bin/bash
Serial t2serial
  • t2serial://PortNameOrNumber:{settings}
  • {settings} is in the following format:
    BaudRate{, DataBits{, Parity{, StopBits{, FlowControl}}}}
    Parity: none, odd, even, mark, space
    StopBits: 1, 1.5, 2
    FlowControl: rtscts, rtscts+xonxoff, xonxoff
    Available options are equivalent to the SerialHandshake options for Windows 10:
    ◾ rtscts: SerialHandshake.RequestToSend
    ◾ rtscts+xonxoff: SerialHandshake.RequestToSendXOnXOff
    ◾ xonxoff: SerialHandshake.XOnXOff
  • When you need to use a standard URL format, you can encode the settings as the following:
    t2serial://PortNameOrNumber?id={device-id}&settings={settings}

    ex.
    t2serial://USB\VID_067B&PID_2303\6&265D47D&0&6:9600,8,none,1
    t2serial://?id=USB%5CVID_067B%26PID_2303%5C6%26265D47D%260%266&settings=9600%2C8%2Cnone%2C1

Bluetooth t2btrf
  • t2btrf://DeviceName[DeviceId]:ServiceId
  • When you need to use a standard URL format, you can encode the settings as the following:
    t2btrf://{DeviceName}?id={DeviceId}&sid={ServiceId}

    ex.
    t2btrf://MINIPC?sid=34B1CF4D-1069-4AD6-89B6-E161D79BE4D8