mount files on remote server on MacOS using sshfs
Pre
Sometimes we want mount files on the remote machine to our local. It’s a little bit like webDav, but actually based on another protocol ssh.
Issue
Tried brew install sshfs, indeed there’s a package there, but according to its description, it requires the linux system, which MacOS is not satisfied(though it’s an Unix-like one) the requirement, and actually the installation will fail.
Solution
Searching on the internet, found there is a sshfs from the osxfuse(it’s now macfuse which can let write to the ntfs format harddisk). there is an sshfs in its github repository.
and you could download the package from macFUSEinstead of compiling it yourself.
Steps
- download the package from macFUSE and install it. You need to do the priviledge permission to
sshfsand the restart mac. - mount
1
2mkdir ~/mnt
sshfs root@192.168.1.101: ~/mnt - umountsometimes if encounter an error try
1
umount ~/mnt
1
umount -f ~/mnt