I have a Pi running headless using ssh and Screen Sharing on OSX and tightvncserver on raspbian.
Can I copy files from the Mac to/from the Pi using ssh or Screen Sharing (i.e. VNC) or do I need to use Samba or similar?
In the 6 years since I posted this Answer many things have changed.
macOS Samba support has improved and Apple now uses Samba as its default for file sharing (and afp doesn't work with newer Apple filesytems)
Debian Buster now uses netatalk 3 - which has significant changes, and requires more configuration to do anything useful.
nfs support in much better in recent Raspbian, but still has problems with write permission from macOS.
I use all of ftp, Samba, afp and nfs;
ftp(Filezilla) for routine file transfer to/from the Pi
Sambafor browsing the Pi Home and shared filesystems and to loop mount my backup images for backup/restoration.
I used ftp to solve my problem (as noted above), but recently discovered another method, which other Mac users may find useful.
sudo apt-get install netatalk
Installs the appletalk protocol on the Pi. This lets you use the following (at the terminal prompt on the Mac) to connect to the Pi
open afp://10.1.1.10 (replace this with your Raspberry Pi IP address)
You can then use Finder (or any other FileManager e.g. QuollEyeTree) to transfer files to or from the Pi, using the same techniques you would use on the Mac
Note: This edit is by another user, and AFAIK is unnecessary If you get the error Couldn't get a file descriptor referring to the console with open afp command try again with sudo, also, make sure you have remote login configured on your mac.
If you have a lot of files, you might also consider using rsync. You'd be able to use the
-P flag (for
--partial --progress), which is handy when you're anticipating a long transfer with potential interruptions - that way the partially-transferred files will be retained (under normal circumstances they're deleted), so that when you resume the transfer, it won't take as long to finish the transfer.
So in your case you could do:
rsync -avP world2/ email@example.com:world2
world2 is a directory, this command would copy the contents of
world2 to the
/world2 directory on the remote machine)
If it's a longer term solution, another option is installing Syncthing or Bittorrent Sync on both machines. It keeps directories on multiple machines syncronized and can handle large files and directories. It's very handy as a file server, backup, and for transferring files.
I just switched to Syncthing from btsync. Syncthing provides more options and control (and btsync has proprietary code).
Their Debian/Ubuntu package at apt.syncthing.net worked fine for me and I used this tutorial as a guide
Set up SMB sharing on your Pi, http://raspberrywebserver.com/serveradmin/share-your-raspberry-pis-files-and-folders-across-a-network.html
Then, on your Mac, go to finder > go > connect to server (cmd+k) > and enter the address of your pi
smb://192.Ras.Pi then you can navigate the folder structure, copy/paste files, etc.
The easiest way I found was using Cyberduck.
deselect anonymous login & then connect.
Installing MacFusion on your Mac will allow you to mount your Pi over SSH, similar to how you would mount a usb stick on your Mac. Then you can use the finder to copy files to any folder on the Pi as you please.