sshfs的安装

windows环境

sshfs客户端和dokan版本要正确,否则可能报version error。下面是验证过的2个配套版本:
1. dokan
https://github.com/dokan-dev/dokany/releases/tag/v1.0.5
2. winsshfs
https://github.com/feo-cz/win-sshfs/releases

mac环境

mac使用的底层技术和window不一样:
1. 安装

brew install Caskroom/cask/osxfuse
brew install sshfs

安装完执行sshfs命令测试一下。
2. 运行

sshfs -C -o reconnect user@hostname:remote_dir local_dir

考虑到之前已经运行过,或者挂载过,每次运行时,都清除掉,重新运行,如果是设置了只允许证书登录,则使用-o ssh_command参数指定ssh的证书,参考命令如下:

pkill -9 sshfs
umount local_dir
sshfs -o ssh_command='ssh -i key' user@hostname:remote_dir  local_dir

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注