Skip to content

xops sftp ​

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

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

Usage examples (OpenSSH-compatible):
  xops sftp user@host[:port]
  xops sftp --sudo user@host                 # Elevated privilege connection
  xops sftp -i ~/.ssh/id_rsa user@host
  xops sftp -J bastion.example.com user@host # Direct jump (supports FQDN/IP/host:port)
  xops sftp -J jumphost user@host            # Alias jump (requires saved node/alias)

Connection Target Semantics:
  Explicit user and port participate fully in matching, automatically reuse existing Host records, strictly isolate Identity credentials, and inherit 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.
  --sudo enables elevated SFTP streams (starts remote sftp-server via escalation channel, or connects directly for root); interactive shell and exec commands inherit elevated privileges by default.

Piped or file input automatically uses batch mode: stop with a nonzero status on the first failure, without history or interactive credential/confirmation prompts. Batch exec uses no PTY; exec/lexec receive EOF on stdin. shell/lshell require an interactive terminal.

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

Flags:
      --alias string       Connection alias
  -f, --force              Force overwrite existing files
  -h, --help               help for sftp
      --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]
  -n, --no-clobber         Do not overwrite existing files (no-clobber)
      --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
      --remember string    Credential persistence policy: ask, always, never; inherits credential.remember_prompted, then ask; batch mode never saves
      --sudo               Request sudo privileges
      --tag strings        Add tag (group) to node
      --task int           Max concurrent file downloads
      --thread int         Concurrent threads per file
  -v, --verbose            Print SSH/SFTP diagnostics (-vv includes file ops, -vvv includes SFTP packets; 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