Network
The scp command
Copies files between your machine and another over the ssh connection.
Syntax
scp <origen> <usuario@host:destino>Most useful options
-rCopies whole folders-PA different portCopy-ready examples
$ scp Documentos/apuntes.txt invitado@servidor-aula:/home/invitado/Upload a file$ scp invitado@servidor-aula:/etc/passwd copia-passwd.txtDownload it to your folderYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- The colon separates the host from the path: without it you would copy to a strange file.
FAQ
Is scp encrypted?
Yes, it uses the same connection as ssh.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course