文章目录
  1. 1. 前言
  2. 2. 更新历史
  3. 3. Dokan和SSHFS
  4. 4. WinSSHFS
  5. 5. 其他代替方案

前言

2017年5月12日国内校园网络遭受勒索病毒蠕虫入侵损失惨重,国内的安全厂商也在第一时间发布安全告警和预防方案,可是通过防火墙直接禁用445端口来解决安全隐患的方式似乎也带来了其他问题,而Samba文件系统共享正是使用了该端口,由于安全的权重大于一切,在研究过CIFS/NFS共享协议以及GoodSync等数据同步软件后发现Dokan+SSHFS可以作为目前比较理想的解决方案。

使用Dokan+SSHFS实现Linux与Windows文件系统共享,解决Samba 445端口被禁的矛盾

更新历史

2017年07月11日 - 补充ExpanDrive和SFTP Net Drive
2017年05月16日 - 初稿

阅读原文 - https://wsgzao.github.io/post/winsshfs/

扩展阅读

Dokan - http://dokan-dev.github.io
WinSSHFS - https://github.com/Foreveryone-cz/win-sshfs


Dokan和SSHFS

User mode file system library for windows with FUSE Wrapper

Dokan是用户态的文件系统驱动,可以称之为fuse for windows。可以用来开发虚拟磁盘,即在“我的电脑”中虚拟出一个硬盘来,可以是硬盘,也可以是可移动磁盘或者网络硬盘。

http://dokan-dev.github.io

SSH(SFTP) filesystem for Windows

SSH(SFTP) filesystem made using Dokan and SSH.NET library. It allows you to mount remote computers via SFTP protocol like windows network drives .

sshfs 是基于 FUSE 构建的 SSH 文件系统客户端程序,通过它远程主机的配置无需作任何改变,就可以透过 SSH 协议来挂载远程文件系统了,非常方便及安全。

https://github.com/Foreveryone-cz/win-sshfs

WinSSHFS

使用方法很简单,这里有一篇国外的文章写得非常清晰,大家遇到问题可以参考下
https://igikorn.com/sshfs-windows-10/

  1. 安装Dokan
  2. 安装WinSSHFS
  3. 配置WinSSHFS然后Mount远端文件夹

Get Dokan here: https://github.com/dokan-dev/dokany/releases
Get WinSSHFS here: https://github.com/Foreveryone-cz/win-sshfs/releases
百度网盘:http://pan.baidu.com/s/1dEPrPfF

其他代替方案

  1. ExpanDrive - http://www.expandrive.com/
  2. SFTP Net Drive - http://www.sftpnetdrive.com/

这里推荐方案2,主要是因为免费但在离线环境下安装不友好,需要设置key

Sorry for the trouble here. The reason this happens is because the free version does technically have a product key, it is just a “special” product key that we use for all free users. Usually, you never notice, because an online machine will activate this special product key without you doing anything. But since your machine is offline, you have to activate it manually. Here are the steps to do that:

  1. Download this file and run it on the offline machine you will use SFTP NetDrive on to get something called your “Node ID”, you’ll need it in a moment:http://www.nsoftware.com/lic/nodeid.exe
  2. If you have the 2016 installer, go to this page on a machine that has internet, then go to step 4: http://www.nsoftware.com/lic/?prod=NDXB-A&sno=NSXBAS-PERSONAL&key=PXE-K3A (if not, go to step 3)
  3. If you have the 2017 installer, go to this page instead: http://www.nsoftware.com/lic/?w64=1&prod=ndxca&sno=NDXCAS-PERSONAL&key=DRG-K4V
  4. Enter your information on the form on that page, using the Node ID you got from step 1. Then, click “Download Keys” to download a keys.reg file.
  5. Copy the .reg file back to your offline machine and run it to add the information to your registry.
  6. Re-run your installer. It should recognize that you already have the free version’s special product key now, and you’ll be able to install it.

If you have any trouble, let me know and I’ll be happy to assist you.

Regards,
Brenden Kromhout
/n software, inc.

如果需要学习Samba可以参考之前的一篇文章
https://wsgzao.github.io/post/samba/

文章目录
  1. 1. 前言
  2. 2. 更新历史
  3. 3. Dokan和SSHFS
  4. 4. WinSSHFS
  5. 5. 其他代替方案