scp: Secure Copy Protocol
August 9th, 2024 8:19 AM Mr. Q Categories: Command
scp
stands for Secure Copy Protocol. It’s a command-line utility that uses SSH (Secure Shell) to securely transfer files and directories between hosts on a network. The data is encrypted during the transfer, ensuring that sensitive information remains protected.
Secure copy
Command: scp
Used to securely copy files and directories between hosts over a network.
Sample Command and Output:
$ scp file1.txt user@remote_host:/home/user/Documents/
file1.txt 100% 12KB 1.2MB/s 00:01
Description:
scp file1.txt user@remote_host:/home/user/Documents/
: Securely copiesfile1.txt
from the local machine to/home/user/Documents/
on the remote hostremote_host
using theuser
account.- The output shows the progress of the file transfer, including the file name, percentage completed, file size, transfer speed, and time remaining.
Sample Command and Output:
$ scp -r folder1/ user@remote_host:/home/user/Backup/
folder1/file2.txt 100% 15KB 1.5MB/s 00:02
folder1/file3.txt 100% 8KB 800KB/s 00:01
Description:
scp -r folder1/ user@remote_host:/home/user/Backup/
: Securely copies the directoryfolder1
and its contents recursively from the local machine to/home/user/Backup/
on the remote hostremote_host
using theuser
account.- The output shows the progress of each file being transferred, including the file name, percentage completed, file size, transfer speed, and time remaining.