Skip to content

xops ssh ​

Command usage and available options are listed below. Check --help for options supported by your installed version.

text
Connect to a remote host via SSH and open an interactive terminal.

Usage examples (OpenSSH-compatible):
  xops ssh user@host[:port]
  xops ssh -l user -p 22 -i ~/.ssh/id_rsa hostname
  xops ssh -J bastion.example.com hostname # Direct jump (supports FQDN/IP/host:port)
  xops ssh -J jumphost hostname            # Alias jump (requires saved node/alias)
  xops ssh -L 8080:localhost:80 -N hostname
  xops ssh -v hostname                    # Connection/session diagnostics
  xops ssh -vvv hostname uptime            # Include requests and cleanup

xops enhanced options:
  xops ssh --host web-01                # Connect by alias/name
  xops ssh --sudo hostname              # Connect with sudo mode
  xops ssh --alias myserver hostname    # Save connection alias
  xops ssh --tag web hostname           # Add tag to node

Connection Target Semantics:
  Explicit user and port participate fully in matching and will never be silently overridden by existing nodes.
  Connecting as a new user to an existing host automatically reuses the existing Host, strictly isolates Identity credentials, and inherits unique host ProxyJump.
  ProxyJump (-J) resolution strategy: Prioritizes saved Node, Alias, or ~/.ssh/config Host; direct jump targets explicitly require Node/Alias, FQDN, IP, or host:port; single-label hostnames without port must be configured as a Node/Alias first.
  Passwords can be supplied through --password-stdin, secure terminal prompts, or configured credential stores. Verified credentials are saved according to the remember policy.

Usage:
  xops ssh [user@]host[:port] [flags]

Flags:
      --alias string             Connection alias
  -f, --background               Requests ssh to go to background just before command execution (implies -n)
  -D, --dynamic-forward string   Dynamic port forwarding (SOCKS5 proxy) listening locally on [bind_address:]port
  -h, --help                     help for ssh
      --host string              Target host / connection alias
  -i, --identity string          SSH identity (private key) file path
      --interpreter string       Remote execution interpreter: server (remote default shell), bash, sh, zsh, fish, powershell, pwsh or cmd
  -J, --jump string              Jump host address, supports Node/Alias, FQDN, IP, or [user@]host[:port]
      --launch-dialect string    Server launch dialect: unknown, posix, fish, powershell or cmd; Bash/sh/zsh/fish require posix or fish
  -L, --local-forward strings    Local port forwarding [bind_address:]port:host:hostport
  -l, --login string             SSH login username
      --login-shell              Enable/disable login for an explicit Bash/zsh/fish interpreter; incompatible with server and --no-login
  -N, --no-cmd                   Do not execute a remote command (useful for just forwarding ports)
      --no-login                 Do not load login shell (prevents welcome messages/MOTD)
      --otp string               One-time password (OTP/2FA) token for the session
      --otp-stdin                Read one-time password (OTP) from standard input
      --passphrase-stdin         Read passphrase securely from stdin to avoid exposure in command arguments
      --password-stdin           Read password securely from stdin to avoid exposure in command arguments
  -p, --port uint16              SSH port
  -q, --quiet                    Suppress SSH diagnostics and tunnel status (errors and security prompts remain)
      --remember string          Credential persistence policy: ask, always, never; inherits credential.remember_prompted, then ask; batch mode never saves
  -R, --remote-forward strings   Remote port forwarding [bind_address:]port:host:hostport
  -n, --stdin-redirect           Redirects stdin from /dev/null (prevents reading from stdin)
      --sudo                     Request sudo privileges
      --tag strings              Add tag (group) to node
  -v, --verbose                  Print SSH diagnostics (-vv includes requests and privilege interactions, -vvv includes terminal handoff and cleanup; independent of --debug)

Global Flags:
      --color string       ANSI color output (auto=detect pipe/redirect, never=disable, always=force enable)
      --debug              Enable debug mode (equivalent to --log-level=debug)
      --lang string        Interface language (zh/en)
      --log-level string   Set internal diagnostic log level (debug, info, warn, error)

MIT License