I wanted to copy an OS 9 application folder from a remote machine to my local one, given that I only had Remote Login access to the far computer.
Since the application and its files had resource forks, this limited my choices. Here's what worked:
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.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020312214435203