Skip to content

Application Command Line Shell Interface

What Command Line Shell Interface

12Port server provides command line interface (CLI Shell) through SSH Proxy service that allows to browse container hierarchy and establish connections to the selected asset endpoints over SSH protocol.

Why use Command Line Shell Interface

Command line shell interface is a convenient tool to use any native SSH client application to browse the content of the credentials vault without using the WEB browser. The CLI Shell also allows to establish connections to several assets one after another one following single authentication into the shell.

How to use Command Line Shell Interface

Connecting to CLI Shell

To connect to CLI Shell use the following command

ssh 12port-user@12port.company.com -p ssh-proxy-port

Where

  • 12port-user is the 12Port tenant user. The user might be prompted to provide MFA configuration if enabled using configured provider.

  • 12port.company.com - 12Port SSH Proxy server

  • ssh-proxy-port - 12Port SSH Proxy port.

Below is the example of the command that connects to CLI Shell using user baker through the SSH Proxy server pam.12port.com running on the port 2200.

ssh baker@pam.12port.com -p 2200

Using CLI Shell

After user authentication, CLI Shell displays the command line prompt that includes current tenant and current site.

tenant(site) />

The command prompt allows up and down arrow to navigate through the command history as well as left and right arrows to edit the commands in the command prompt.

CLI Shell supports the following commands

  • help or ? - prints description of commands
  • alias - prints command aliases
  • exit - exits the shell
  • change container container-name or cd container-name - switches current container to a new one
  • change site site-name - switches current site to a new one
  • list assets or ll - list assets in the current container including the asset type, asset ID and asset name.
  • list sites - lists sub-sites of the current site
  • connect asset-name or connect asset-id - establishes SSH connection to the asset giben by asset name or asset ID. Note that the asset name should be unique.

Session reporting

12Port session report provides visibility to the time when CLI Shell connection was established as well as for the user connecting to the shell.

The CLI Shell sessions include SSHP:Shell keyword in the Channel field.