scp file.txt user@host:/tmp/Copy a file to a remote machine over SSH.
▸ Open this command in the explainer →scp uses the SSH protocol to transfer file.txt to /tmp/ on host as user. Swap the arguments to pull a file down instead, and add -r to copy a directory recursively. (rsync is better for large or repeated transfers.)
$ scp file.txt user@host:/tmp/
See the full reference for scp — every flag it supports.
Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.