as a premise, you can access to the remote server by ssh
You need homebrew for mac
brew install macfuse
brew install gromgit/fuse/sshfs-mac
After you install the macfuse
and sshfs-mac
, you may be asked to enable some kernel security stuff (for apple silicon).
You need to change the security policy.
(sorry I could not found some English page, it may transfer to your language)
https://support.apple.com/ja-jp/guide/mac-help/mchl768f7291/mac
(you can skip this part if you don't need to change the kernel security)
- reboot you system
- press command + R and get in to the boot option (for Apple silicon, press power button instead)
- go to "option", and login with your admin account
- select the
utility
>startup security utility
in the top left menu - allow the kernel extension to the identified developers
- reboot
- allow the extension in the System Settings (System Preferences), then reboot if it requires
You can use the .ssh/config
to specify a host. this means you can pass the jump server.
In my environment, I could not use ~
for a path of remote server. So you may should use /home/...
.
# mount
sshfs your_remote_server:/dir/which/you/want /where/you/want/to/mount
# unmount
umount -f /where/you/want/to/mount