Use SCP for remote file transfers on Mac/Linux/Windows

This will be short article with a quick hint. I wanted to write it, because I often get asked how to easily transfer files from a machine to another. Of course you could just upload a file to dropbox and download it on the other machine, but for this method you can transfer files to a headless system easily and without having to physically access the remote computer, which is quite handy if the remote computer is somewhere else than you are.

Sometimes you need to transfer files from one computer to another. The simples way of sending files between computers in your home network is using SCP (secure copy). For those of you, who use a UNIX based system, SCP is already built into your system. I often have to transfer files from my macintosh computer to a Raspberry Pi or BeagleBone, so using SCP comes in very handy for me. This page is intended to be a quick and very short reference for secure copy. For more details, visit the scp man page.

If you are using windows, there is an alternative for you below!


The SCP command copies a local file to a remote computer:

 scp <local_file> <remote_user>@<remote_machine>:<remote_path>

For example:

 scp ~/cat.jpg pi@

This will copy the file cat.jpg to the remote user’s (pi’s) home directory on the machine with the ip-address

If you want to transfer a remote file to your local machine, use:

 scp <remote_user>@<remote_machine>:<remote_path> <local_path>


If you are using windows, there are alternatives like WinSCP, which combines different protocols and functionalities into a handy app for windows. Alternatively you can install a linux bash on windows.


One thought on “Use SCP for remote file transfers on Mac/Linux/Windows

Leave your two cents, comment here!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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