Skip to content

Viewing and Copying Commands

Copy generated SSH or AWS Session Manager commands for use in terminals or scripts.


Access the Command Section

  1. Select a tunnel in the main window.
  2. In the Port Mapping section, find Command (collapsed by default).
  3. Click the disclosure triangle to expand it.

Command Types

SSH Tunnels

ssh -p 2222 -l ubuntu -i ~/.ssh/prod_key prod.example.com

The command shown is built from the tunnel's settings, including port forwarding, so your output has more options.

Parameter Example Purpose
-p -p 2222 Port (if non-standard)
-l -l ubuntu Username
-i -i ~/.ssh/prod_key Identity file path
Host prod.example.com Target server

AWS Session Manager

aws ssm start-session --target i-0abc123def456 --region us-east-1 --profile production --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters 'host=mydb.example.us-east-1.rds.amazonaws.com,portNumber=5432,localPortNumber=5432'
Parameter Purpose
--target EC2 instance ID
--region AWS region
--profile AWS profile
--document-name AWS-StartPortForwardingSessionToRemoteHost, or AWS-StartPortForwardingSession with no host
--parameters Database host, remote port, and local port

Running the command in Terminal uses your AWS CLI credentials. It is useful for checking that the same profile works outside StormTunnel.


Copy to Clipboard

Click Copy or press Cmd+Shift+C with the detail view active.

The command is copied with proper shell escaping.


Warnings

Warnings appear below the command when the configuration may have a problem. Examples:

Warning Action
Password authentication is not secure Use key-based authentication
No SSH identity file specified Select an SSH key in the tunnel editor
Specified SSH identity file does not exist Re-import the key or choose another one
Port number is invalid Use a value between 1 and 65535
AWS profile not specified (will use default profile) Choose an AWS profile
AWS region not specified (will use configured region) Choose an AWS region
AWS instance ID format appears invalid Verify the instance ID in the AWS console

Informational Only

Warnings do not prevent command generation -- they flag potential issues.


Common Uses

Paste in Terminal

  1. Copy command (Cmd+Shift+C)
  2. Open Terminal
  3. Paste (Cmd+V) and run

Add to SSH Config

Use the command parameters to create an SSH config entry:

Host prod-db
    HostName prod.example.com
    Port 2222
    User ubuntu
    IdentityFile ~/.ssh/prod_key

Then connect with ssh prod-db.