Smart Cities - Transferring Files using Secure Copy
Introduction
- The fastest way to copy files between two computers is to use Secure Copy (scp)[1].
- This method is executed from the Terminal and hence eliminates the overhead of a GUI application.
- It is both fast and secure.
- Files can be transferred in both directions.
Prerequisites
- In this lesson it is assumed that Secure Shell (SSH) has been enabled on both computers.
Enabling SSH on a Raspberry Pi
- In the Terminal enter the command sudo raspi-config
- In the raspi-config menu select Interface Options
- Select SSH (Secure Shell) and then select Enable SSH
- SSH will now be enabled. There is no need to reboot the computer.
- Exit raspi-config
Copy File From Local Host to Remote Server
- In this example we will copy a file from a local host computer to a remote computer on the same network.
- 192.168.1.105 Local computer IP address
- 192.168.1.120 Remote computer IP address