This is just what I was looking for. I wanted to make a service housed on a non-OS X system visible from outside the home network. Elsewhere on here, I found out how to use scutil to find out my Back to My Mac network:
echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'
So I can take that and use it to populate this:
BTMM=`echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'`
dns-sd -P <advertised host name> _ssh._tcp ${BTMM} 22 <real host name> <real IP address—could be a hostname if it resolves> path=/
The beauty of this is that I don't have to remember to do anything before I leave the house, as long as some variant of ZeroConf is running. I can advertise the remote service from wherever I am, use it, then take down the advertisement. So I run the commands and then look in my Shell -> New Remote Command dialog and there it is. I can then copy files to and fro, run commands, access the home network, all as if I was there.