Skip to content

fm shell ​

Reference for the fm shell command group (auto-generated from fm shell --help).

fm shell ​

text
Open an interactive terminal (or run a command) on a compute instance over
the platform session plane — no public IP, open port, or SSH daemon
required. The instance must have been created with --instance-access.

This is not SSH: the instance's in-guest agent dials out to the platform
and the terminal rides that connection, so this path needs no listener on
the VM and no key or port of yours. (SSH to your own instance still works
as it always has, with a key you supply; this is an additional way in.
"fm ssh" also still works, as an alias for this command.)

With no command, you get an interactive login shell (a PTY is allocated
when stdin is a terminal). With a command after '--', it runs
non-interactively over pipes — script-safe: stdout is not CR/LF-mangled
and the remote exit code becomes fm's exit code. Use --tty to force a PTY
either way.

Sessions are time-limited by the platform: they end after 10 minutes of
inactivity or 1 hour total.

Usage:
  fm shell <instance-id> [-- command] [flags]

Aliases:
  shell, ssh, session

Examples:
  # Interactive shell
  fm shell ins_VqwCjz3fPY1S14V7X1wwxM

  # As a specific user
  fm shell ins_VqwCjz3fPY1S14V7X1wwxM --user debian

  # Run a command, keep its exit code
  fm shell ins_VqwCjz3fPY1S14V7X1wwxM -- systemctl is-active nginx

Flags:
  -h, --help[=true|false]   help for shell
      --tty[=true|false]    force PTY allocation even when running a command or with non-TTY stdin
      --user string         target login user on the instance (default: the agent's configured user)

Global Flags:
      --config string           config file (default is $FM_CONFIG, else $HOME/.fm/config.yaml)
  -d, --debug[=true|false]      enable debug/verbose output
      --no-color[=true|false]   disable colored output
  -o, --output string           output format: table, json, yaml, wide (default "table")
  -q, --quiet[=true|false]      suppress non-essential output
      --tenant string           tenant ID to operate on (overrides the active/default tenant; also FM_TENANT)