Purpose: Provide instruction on how to install and configure SSHFS to allow the secure mounting of network shares via SSH.
Table of Contents
Installing SSHFS (from Terminal):
Code Block |
---|
sudo port install sshfs |
...
In System Preferences select the macFUSE icon and check for updates. You may experience issues with mounting network shares with macFUSE on your machine is not up to date.
Note: If you do not see macFUSE appear in the System Settings window, you can download macFUSE manually from https://osxfuse.github.io/ to install the program. Be sure to download the correct dmg based on the OS and chipset you are installing on.
Note: These instructions below are only for M1 users:
...
Press and hold the power button until “Loading startup options” appears.
Click Options, then click Continue.
Select an administrator account, then click Next.
Enter the password for the administrator account, then click Continue.
In the Recovery app, choose Utilities > Startup Security Utility.
Select the system you want to use to set the security policy.
If the disk is encrypted with FileVault, click Unlock, enter the password, then click Unlock.
Click Security Policy.
- You will need to select the "Reduced Security: Allows any version of signed operating system software ever trusted by Apple to run" option.
- You will then select "Allow remote management of kernel extensions and automatic software updates: Authorizes remote management of legacy kernel extensions and software updates using a mobile device management (MDM) solution." option
- Click OK
If you changed the security, click the User pop-up menu, choose an administrator account, enter the password for the account, then click OK.
- Choose Apple menu > Restart. (You must restart your Mac for the changes to take effect.)
Connecting to a network share
Creating the mount directories
...
Warning: do not use sudo for this command, it will create a permission error
Code Block |
---|
mkdir ~/mnt |
Connecting to a network share
Note: If the RSA key for your computer changed recently, consult What to do When a Remote Machines RSA Key has Changed
Warning: do not use sudo for this command, it will create a permission error
...
The network share should now be mounted to the specified directory and accessible in Finder.
Unmounting the network share
To unmount the network share you created, enter the following command:
Code Block |
---|
umount /path/to/directory |
Using sshfs with ssh keys
Create the key on your computer. We recommend using the default key location. You may create a password if you'd like.
...