Enhancing Skills

scp: Secure Copy Protocol

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 copies file1.txt from the local machine to /home/user/Documents/ on the remote host remote_host using the user 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 directory folder1 and its contents recursively from the local machine to /home/user/Backup/ on the remote host remote_host using the user account.
  • The output shows the progress of each file being transferred, including the file name, percentage completed, file size, transfer speed, and time remaining.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.