Remote Access

scp

Copies files over SSH.

scp transfers files between local and remote systems using SSH authentication.

Syntax
scp [options] source destination

Arguments explained

  • source and destination can be local paths or user@host:path remote paths.
  • -r copies directories recursively.
  • -P chooses SSH port.

Common examples

Copy to a server
scp report.pdf alex@example.com:/home/alex/

Uploads report.pdf to the remote home directory.

Copy from a server
scp alex@example.com:/var/log/app.log .

Downloads app.log to the current local directory.

scp Command
FieldDetails
Commandscp
CategoryRemote Access
Primary useCopies files over SSH.
Syntaxscp [options] source destination