Enable/Disable Sharing (SSH/File) Based on Network?
You can use ControlPlane for this. It allows you to control your context, like home and other, and set actions for it: when 'enter' home context, enable file sharing, when 'leave' home context, disable file sharing.