Labels

Arduino (1) Bugs (3) C (1) Install (3) Linux (25) Maths (1) Python (11) Raspberry Pi (4)

Sunday, 17 January 2016

How to transfer files using SCP

SCP is a secure file transfer that uses SSH for the data transfer which is why it is secure as it uses the same authentication.

To use it the client needs to be running SSH.

Things we need to know:
Username and password for host
IP address for the host box.
Where the file is located i.e /home/pi/file.txt

How to use it:
To copy one file from the remote host use the command:
scp pi@192.168.0.10:/home/pi/file.txt /home/(WHERE YOU WANT THE FILE)

To copy one file to the remote host use the command:
scp /home/(FILE to copy) pi@192.168.0.10:/home/pi/file.txt

Increase security:
scp -c 3des pi@192.168.0.10:/home/pi/file.txt /home/(WHERE YOU WANT THE FILE)

Increase speed using compression:
scp -C pi@192.168.0.10:/home/pi/file.txt /home/(WHERE YOU WANT THE FILE)