For Raspberry Pi users, this article is a detailed guide to use the SCP command to transfer files from other systems like a laptop, PC, or another Raspberry Pi device via SSH.
How to Transfer Files Via SSH to Raspberry Pi Using SCP
Before transferring files via SSH on Raspberry Pi through SCP, ensure SSH is enabled on your Raspberry Pi system. If not, you can use the guidelines to enable SSH on your system.
Once the SSH is enabled on your system, you can start transferring the file from your PC, laptop, or other Raspberry Pi using the following command:
The above command can be summarized as follows:
source file_location on PC/laptop/Raspberry Pi: The location of the file you want to send from your laptop, PC, or other Raspberry Pi device.
username: The Raspberry Pi username can be observed from the terminal:
IP_address: The IP address of the Raspberry Pi device, which can be found using following command:
destination: The location where you want to save your file on PC or laptop.
For example, I am sending a file “1password-cli-arm-katest.deb” present in the folder “C:\Users\awaix\Downloads” to a Raspberry Pi device with username “pi”, IP address as “192.168.18.67” and the destination is “/home/pi/Downloads”.
You may ask to enter “yes” to fingerprint notification for the first time and after that, you have to enter the Raspberry Pi default password to start sending the file from your laptop or PC to Raspberry Pi.
After successfully sending the files to Raspberry Pi, you can navigate to the Downloads folder on Raspberry Pi to see the file.
In this way, you can send multiple files from a PC or laptop to Raspberry Pi and it is the easiest way to transfer any file quickly. The same process has to be applied for sending the file from Raspberry Pi to a laptop, PC, or other Raspberry Pi devices.
Sending file from One Raspberry Pi Device to Other
Below, I have attached the screenshots for sending files from one Raspberry Pi device to another Raspberry Pi device using SCP command.
Conclusion
SCP command is an effective program that helps users easily send files to Raspberry Pi from a PC and vice versa. This program is already installed in all operating systems. You can easily transfer any file between two systems using the command-line terminal or transfer the file to multiple Raspberry Pi devices. You can follow the command presented above to transfer any file in seconds.