It comes to a point that inevitably, I gotta mount a shared drive between my work mac, my personal mac and the remote GPU instance I’m snitching at. I need a confluent development experience on multiple machines, rsync is terrible and IDE is out of question here.
Hmmmm so how did I setup a centralized workspace, how do I smoothly mount a network file system on my mac?
The truth turns out, that you don’t need a “centralized” workspace, sshfs mount is the fastest and simplest network file sharing system you want. 2 reasons NFS and SMB(Samba) is out of consideration here:
1. hard to configure and setup: NFS merely whitelist client’s IPs, there’s ways to configure LDAP/kerberos on that but way over our use case.
2. corp AWS acct somehow blocks any traffic other than ssh, still don’t really understand. ssh port is open to public solid…
command to setup sshfs:
essentially it’s using sftp to sync up files, and access control model is identical to ssh.
on you Macbook, use the following commands to install (1) osxfuse (osx file system extension) and (2) sshfs
brew cask install osxfuse
brew install sshfs
use the following command to mount the remote server:
sshfs <username>@hostname:/home/ubuntu /Users/shengmiw/sshfsremote -ovolname=OSFUSESSHFS
remember to have your ssh config setup according for the above host.
once you’re done, use the following command to unmount:
diskutil unmount /Users/shengmiw/sshfsremote