I would like my RPi to take a sequence of images and store them on my mac directly. My mac and RPi are connected via ethernet cable and I can ssh into my RPi via ssh pi@ I installed the RPi camera and can already store photos on the RPi by e.g. using the following commands:

mkdir pictures
cd pictures
raspistill -o a%04d.jpg -t 3000 -tl 1000

This is indeed working as ls *.jpg shows

a001.jpg a0002.jpg a0003.jpg a0004.jpg

How can I do the same but store these directly on my mac? My mac ip address is

Update: I dont want to just transfer files between the RPi and my mac, I want to change the directory where raspistill stores the images to my mac. I was hopeing something like raspistill -o -a%04d.jpg would work


As you know that ssh is used to remotely login computer. ssh default don't offer a service to move a file from remote computer to your local computer.

But yes you can perform the operation using some other options.

scp command can be used to transfer the files from remote computer to your local computer and vice-versa.


Copy File from Remote Computer to Local Computer:

scp pi@ /home/noones/Desktop/localFolder

Copy File from Local Computer to Remote Computer:

scp /home/noones/Desktop/localFolder/nepal.txt pi@

Use your RaspberryPi private ip address, i've used mine in above example.

  • A correction please, that actually, I myself found out recently that ssh has sftp built in by default. So just by enabling ssh you can use FileZilla to connect to the box using sftp too, its not JUST remote console but file transfer too. The Mac, with some software, can connect to the Pi over sftp and download files periodically.
    – Piotr Kula
    Nov 4 '14 at 12:18
  • Also, how do supply password in the scp command line?
    – Piotr Kula
    Nov 4 '14 at 12:19
  • you will be asked to enter the password after you execute any of the command above. Nov 4 '14 at 18:14

You could just mount a Macintosh share via NFS, but...

A bit of a longer solution using BitTorrent Sync. I like this solution because its fast, secures and scaleable.

mkdir ~/.btsync && cd ~/.btsync
wget http://download-new.utorrent.com/endpoint/btsync/os/linux-arm/track/stable
tar -xfv bittorrent_sync_arm.tar.gz

Make sure to always download from BTSync. Do not use those files coming from amazon cloud, they could contain a backdoor.

Now you can run it and you should see a forked message.

cd ~/.btsync
sudo ./btsync  # can be killed with `sudo killall btsync`

Now simply, form any other machine navigate to http://Your-Pi-IP-Address:8888/gui and add the folder you want to share. You will get a secret code there that you need to paste in on your Mac (Yes, I know, you need to install it where you want it)

But think ahead a bit, you can then install BTSync to a private vps or any other PC where and supply it with a secret and it will stay in sync, across the internet, lans or even mobiles.

  • I want to save the images directly on the network drive, not first on the RPi and subsequently move them. How would I do that?
    – crazjo
    Nov 4 '14 at 13:12
  • Oh right, yea makes sense you dont want to wreck the SD card. let me check... computer noises
    – Piotr Kula
    Nov 4 '14 at 14:01
  • I suggest 'sshfs' to mount a remote folder on the local file system using ssh.
    – user236012
    Jan 28 '15 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.