Since the application and its files had resource forks, this limited my choices. Here's what worked:
- Turn on File Sharing on the local computer
- ssh to remote
- remotely mount the afp volume you just shared
- copy files to the afp volume using ditto
- unmount the afp volume
- exit ssh, and
- turn off local File Sharing.
ssh -2 -l remoteUserName remote.wherever.com
sudo mkdir /afptemp
# Can be anything instead of afptemp, but needs to be in root directory
sudo mount_afp afp://user:password@111.111.111.111/user /afptemp
# Substitute your local IP address for 111.111.111.111
sudo ditto -V -rsrcFork remoteFolder /afptemp/localFolder
# -V is nice to see progress as each file is copied
sudo umount /afptemp
exit
Thanks to Mount AFP volumes from the terminal by dreness, and for ditto info, Easy and complete folder backups by robg.
Other approaches I tried that didn't work: Some popular methods like secure copy (scp, which the fine program RBrowser uses) don't copy resource forks. And I tried both iDisk (which is resource-fork friendly) and Disk Image (which can contain files with resource forks inside, yet doesn't need a resource fork itself) approaches, but both were problematic.Additional reading:
- Mount your iDisk from the command line by robg
- Create a Disk Image from the command line: see the examples portion of man hdiutil (thanks to a comment by el bid about Disk Copy not optimal for scripting)

