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 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 of successful connections are encrypted and stored in config.
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
-J, --jump string Jump host address, supports Node/Alias, FQDN, IP, or [user@]host[:port]
-L, --local-forward strings Local port forwarding [bind_address:]port:host:hostport
-l, --login string SSH login username
-N, --no-cmd Do not execute a remote command (useful for just forwarding ports)
--passphrase string SSH private key passphrase
--passphrase-stdin Read passphrase securely from stdin to avoid exposure in command arguments
--password string SSH password
--password-stdin Read password securely from stdin to avoid exposure in command arguments
-p, --port uint16 SSH port
--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
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)