2

I have a Raspberry Pi 3 with Jessie Lite (terminal only) and I have to transfer a file which is on my Raspberry to a Mac.

How can I do it?

5

Run the command on your Mac:

scp pi@raspberry.local:/path/to/file .

And the file will be transferred to your current directory.

Assuming your Raspberry Pi is accessible through its default hostname raspberry.local in the local network. Also assuming the user pi has read access to the file.

2

Techraf's answer is good, and what I would do myself. However it won't work if SSH is not enabled. Here are a couple of other alternatives. You could use a service like Dropbox. or what used to be called sneaker net, and copy the file to a flashdrive, you could even copy the file to the /boot partition of your Pi's SD card (the boot partiton is readable from macOS and Windows).

Dropbox has support for the commandline. Installation and usage details can be found here.

To copy the file to the SD card or a flash drive you will need either the cp (copy command) or the mv (move command) you can read the manual (help) page for these commands by using the man command: man mv or man cp. You may also want to read the man page for the man command usng man man.

1

There are many ways to do this. ssh certainly works from the command line, but there are better ways, which most macOS users would find familiar.

If you install netatalk on the Pi you can use it from OS X. You can connect using
open afp://raspberrypi.local on the Mac. It is also possible to connect from the sidebar in Finder although I find this annoying.

See https://raspberrypi.stackexchange.com/a/39665/8697

1

In my opinion, you have to configure a samba server, this is a practical guide RaspberryWebServer to install and configure it. With it, you can access on your raspberry from every device.

0

You can install cyberduck https://cyberduck.io/download/ and use graphical interface for connecting and copying files from your rapsberry pi through to your mac

Only important part is you have to select sftp instead of ftp connection

cyberduck raspberry pi setup

  • Isn't this require an SFTP server installation on the Raspberry Pi? And there is an accepted answer that uses scp. – MatsK Feb 26 at 15:34
  • If you enable ssh you also enable sftp server (and you don't have to install it raspberrypi.org/documentation/remote-access/ssh/sftp.md) . Using cyberduck is just another solution to this problem. – fakturk Feb 26 at 16:46
0

For one-off transfers from your Pi you could run python -m SimpleHTTPServer in the directory where your file is located and then, on your Mac, browse to http://raspberrypi.local:8000/ to download it. A caveat to this is if the file is an image or HTML the you might need to use something like 'Save As...' or 'Download source' to download and not display it. Type Ctrl+C on the Pi to close the python web server when you're done.

For a more permanent solution then use one of the other fine answers already provided.

https://docs.python.org/2/library/simplehttpserver.html

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.