Online Linux Terminal Logo
OnlineLinuxTerminal
Réseau et transfertCLI Manual

$scp

Securely copy files and directories between hosts over SSH connection.

Syntaxe de la commandePOSIX Standard
scp [OPTIONS] SOURCE DEST
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

`scp` (Secure Copy Protocol) transfers files securely between a local host and a remote host, or between two remote servers, using the same authentication and encryption as SSH.

Options et drapeaux courants

Flag / OptionDescription
-rRecursively copy entire directories.
-P [port]Specify port to connect to on the remote host.
-i [keyfile]Identity file for SSH private key authentication.

Exemples pratiques du monde réel

#1Copy a local file to remote server
scp notes.txt user@remote-server:/home/user/docs/

Uploads notes.txt to the remote server directory over SSH.