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?
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 unecessary 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 can use
ssh, then most probably
scp (SSH copy) will work as well.
i would install samba anyway, because there are too many winboxen everywhere and the next thing you might need will be the access from windows.
Did you try
scp with the
-r flag? Because without it, it won't perform a recursive copy.
If you were looking to copy the file or folder
world2, this is how I would do it:
$ scp -rv world2 email@example.com:/path/to/copy/of/world2/
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/ firstname.lastname@example.org: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
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.
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.
Just use FileZilla and set a new site from site manager on File Menu. Then select SFTP and fill in with you Rasp username and password and you're good to go.