Skip to content

xops scp ​

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

text
Upload, download, or relay files between local and remote hosts.

Single-host transfer (node name, alias, or [user@]host; use -P for port):
  xops scp local_path web-01:remote_path
  xops scp web-01:remote_path local_path
  xops scp web-01:path1 web-02:path2
  xops scp --sudo local_path web-01:/root/remote_path # Elevated transfer
  xops scp -i ~/.ssh/id_rsa -P 122 local_path user@host:remote_path

Target or batch upload (local -> one or more hosts):
  xops scp --host web-01 local_path remote_path
  xops scp --host web-01,web-02 local_path remote_path
  xops scp --tag web local_path remote_path
  xops scp -I hosts.txt local_path remote_path

Named-flag compatibility (must pass both --src and --dest without positional paths):
  xops scp --src local_path --dest web-01:remote_path

Path and target rules:
  Both source and destination paths are required (source first, destination second).
  Everything after the host colon is treated as the file path (e.g., user@host:22:file means file 22:file); use -P/--port for the SSH port.
  When -P is omitted, XOps uses the matched node's configured port; if a host matches multiple ports, specify -P or a unique alias.
  --host, -I/--ifile, and --tag are mutually exclusive (use --exclude to filter hosts). When any of them is set, XOps always uploads from local and treats : or @ in both paths as literal filename characters.
  --sudo enables privilege escalation (root SFTPv3 stream), applying to uploads, downloads, and remote-to-remote relays.

Progress and diagnostics:
  Progress bars appear by default in terminals and are hidden when redirected or piped.
  -q/--quiet hides the progress bar and SSH warnings/diagnostics (errors and security prompts remain visible).
  -v/--verbose prints SSH/SFTP connection and transfer diagnostics (independent of --debug):
    -v   connection, auth, and transfer status
    -vv  adds SFTP extensions and file operations
    -vvv adds SFTP packet details
  Flag order follows OpenSSH: -qv hides progress while keeping SSH/SFTP diagnostics; -vq keeps only SCP transfer diagnostics.

Usage:
  xops scp [flags] [[user@]host:]source [[user@]host:]dest

Flags:
      --alias string       Connection alias
      --dest string        Destination path (compatibility flag; requires --src and cannot mix with positional paths)
      --exclude strings    Exclude specified hosts (supports Node ID / alias / IP / User@Host, comma separated or specified multiple times)
  -f, --force              Force overwrite existing files
  -h, --help               help for scp
      --host string        Target hosts, comma separated
  -i, --identity string    SSH identity (private key) file path
  -I, --ifile string       Host list file path
  -J, --jump string        Jump host address, supports Node/Alias, FQDN, IP, or [user@]host[:port]
  -l, --login string       SSH login username
  -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
  -P, --port uint16        SSH port
  -q, --quiet              Hide progress bar and SSH warnings/diagnostics (errors and security prompts remain)
  -r, --recursive          Copy directories recursively
      --remember string    Credential persistence policy: ask, always, never; inherits credential.remember_prompted, then ask; batch mode never saves
      --src string         Source path (compatibility flag; requires --dest and cannot mix with positional paths)
      --sudo               Request sudo privileges
      --tag string         Transfer by group (tag)
      --task int           Number of parallel host transfers (default 3)
      --thread int         Concurrent threads per file transfer (default 4)
  -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