ssh_scp
Copy files or directories to or from a remote host using SCP. Supports upload, download, recursive directory copying, and custom SSH flags.
Instructions
Copy files or directories between the local machine and one remote target via the local scp client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| target | Yes | OpenSSH target (host alias or user@host). Specifies the remote host — do not include the host in sources or destination. | |
| sources | Yes | For upload: local file or directory paths. For download: remote paths (without host prefix — the host is set by 'target'). | |
| timeout | No | Local timeout in seconds. | |
| direction | Yes | ||
| recursive | No | Copy directories recursively. Required when any source is a directory. | |
| destination | Yes | For upload: remote directory path. For download: local directory or file path. | |
| identity_file | No | ||
| extra_ssh_args | No | Additional ssh(1) flags passed verbatim, e.g. ["-J", "jumphost"]. Prefer the dedicated port, identity_file, and strict_host_key_checking parameters. | |
| preserve_times | No | Preserve modification times and modes. | |
| known_hosts_file | No | ||
| strict_host_key_checking | No | Boolean or one of yes, no, ask, accept-new, off. |