如何通过SSH在Windows中安装远程Linux文件夹?

时间:2021-05-25 07:08:55

I'm a blind student currently in a system admin/shell programming class. Although ssh works fine for executing commands like ls, pwd, etc editors do not work well with my screen reader and an ssh session. I was wondering if it is possible to mount a Linux folder over ssh so it appears as a windows drive? This way I could edit any files I needed to with accessible software and not have to constantly use SCP to send files back and fourth.

我现在是一个盲人学生,在一个系统管理员/外壳编程课。虽然ssh能够很好地执行像ls、pwd等命令,但是对于我的屏幕阅读器和ssh会话,编辑器不能很好地工作。我想知道是否可以在ssh上挂载一个Linux文件夹,使它显示为windows驱动器?通过这种方式,我可以用可访问的软件编辑任何我需要的文件,而不必经常使用SCP将文件发送回来。

10 个解决方案

#1


43  

Back in 2002, Novell developed some software called NetDrive that can map a WebDAV, FTP, SFTP, etc. share to a windows drive letter. It is now abandonware, so it's no longer maintained (and not available on the Novell website), but it's free to use. I found quite a few available to download by searching for "netdrive.exe" I actually downloaded a few and compared their md5sums to make sure that I was getting a common (and hopefully safe) version.

早在2002年,Novell就开发了一种叫做NetDrive的软件,它可以将WebDAV、FTP、SFTP等文件映射到windows drive信中。它现在被抛弃了,所以它不再被维护(在Novell网站上也没有),但是它可以免费使用。通过搜索“netdrive”,我找到了相当多可用的下载工具。我实际上下载了一些,并比较了他们的md5sum,以确保我得到了一个通用(希望是安全的)版本。

Update 10 Nov 2017 SFTPNetDrive is the current project from the original netdrive project. And they made it free for personal use:

2017年11月10日更新SFTPNetDrive是原netdrive项目的当前项目。他们免费提供给个人使用:

We Made SFTP Net Drive FREE for Personal Use

我们免费提供SFTP网络驱动器供个人使用

They have paid options as well on the website.

他们在网站上也支付了期权。

#2


40  

Dokan looks like a FUSE and sshfs implementation for Windows. If it works as expected and advertised, it would do exactly what you are looking for.

Dokan看起来像是Windows的FUSE和sshfs实现。如果它像预期的那样工作和宣传的那样,它就会做你想做的事。

(Link updated and working 2015-10-15)

(链接更新及工作2015-10-15)

#3


14  

Another, more Windows-y option (for $39) is http://www.expandrive.com/sftpdrive

另一个Windows-y选项(39美元)是http://www.expandrive.com/sftpdrive

#4


12  

The best an easiest solution I found is https://github.com/Foreveryone-cz/win-sshfs, connected servers shows up as a fully functioning network drives.

我发现的最简单的解决方案是https://github.com/Foreveryone-cz/win-sshfs,连接服务器显示为一个功能齐全的网络驱动器。

The install is tricky as you need to also download the correct version of 'dokany', to save myself some time and you I created a ziped files with the right downloads for v1.6.1.13 here. Please take a moment and upvote this issue to make the install simpler in the future: https://github.com/Foreveryone-cz/win-sshfs/issues/166

安装很麻烦,因为您还需要下载“dokany”的正确版本,这样可以节省一些时间,您也可以在这里为1.6.1.1.13创建一个压缩文件,并获得正确的下载。请花一点时间,对这个问题进行投票,使安装在未来变得更简单:https://github.com/Foreveryone-cz/win-sshfs/issues/166

Please note previously this answer stated, http://www.swish-sftp.org/ but I no longer use it.

请注意之前的回答,http://www.swish-sftp.org/,但我不再使用它。

如何通过SSH在Windows中安装远程Linux文件夹?

#5


5  

Take a look at CIFS (http://www.samba.org/cifs/). It is a virtual file system you can run on your linux machine that will allow you to mount folders on your linux machine in windows using SMB.

看看CIFS (http://www.samba.org/cifs/)。它是一个可以在linux机器上运行的虚拟文件系统,允许您使用SMB在linux机器上安装文件夹。

CIFS on linux information can be found here: http://linux-cifs.samba.org/

linux信息上的CIFS可以在这里找到:http://linux-cifs.samba.org/

#6


3  

You need to mount a remote share on your windows machine. This is what Samba/smb is for.

您需要在windows机器上安装远程共享。这就是Samba/smb的用途。

What you'll be doing is turning your Linux box into an SMB server, which lets it share files in a way that plays nice with Windows.

您将要做的是将您的Linux box转换为SMB服务器,使其能够以与Windows兼容的方式共享文件。

If you're not on the same network, you'll need to tunnel this through your SSH connection which may not be worth the effort.

如果您不在同一个网络上,那么需要通过SSH连接来实现这一点,这可能不值得付出努力。

#7


1  

check out Dokan

看看Dokan

https://dokan-dev.github.io/

https://dokan-dev.github.io/

it's iffy, but it works, and it's free

这是不确定的,但它是有效的,而且是免费的

#8


0  

I don't think you can mount a Linux folder as a network drive under windows having only access to ssh. I can suggest you to use WinSCP that allows you to transfer file through ssh and it's free.

我认为您不能将Linux文件夹挂载为windows下的网络驱动器,只能访问ssh。我建议您使用WinSCP,它允许您通过ssh传输文件,而且是免费的。

EDIT: well, sorry. Vinko posted before me and now i've learned a new thing :)

编辑:哦,抱歉。Vinko在我之前发帖,现在我学到一件新东西:

#9


0  

Apparently the free NetDrive software from Novell can access SFTP file servers.

显然,Novell的免费NetDrive软件可以访问SFTP文件服务器。

#10


0  

Second David's answer below: I needed to mount a network drive automatically when users logged in. Dokan SSHFS is a nice tool, but wasn't reliable enough in this case. The copy of Netdrive I found didn't support SSHFS or sftp - not sure if a more recent one does.

第二个大卫的回答是:我需要在用户登录时自动安装网络驱动器。Dokan SSHFS是一个很好的工具,但是在这种情况下不够可靠。我发现Netdrive的拷贝不支持SSHFS或sftp——不确定是否最近的一个。

The solution I'm trialling now involves adding a virtual network adapter (with file sharing disabled), using plink to open a tunnel via the new adapter to the remote machine running SAMBA, and mounting the network drive against the new adapter. There's another useful tutorial here http://www.blisstonia.com/eolson/notes/smboverssh.php.

我正在试验的解决方案包括添加一个虚拟网络适配器(禁用文件共享),使用plink通过运行SAMBA的远程机器的新适配器打开一个隧道,并针对新的适配器安装网络驱动器。这里还有另一个有用的教程http://www.blisstonia.com/eolson/notes/smboverssh.php。

The tunnel and network drive can be set up with a login script, so a few seconds after login users can use the mapped drive without needing to take any action.

可以使用登录脚本设置隧道和网络驱动器,因此登录用户只需几秒钟就可以使用映射驱动器,而无需采取任何操作。

#1


43  

Back in 2002, Novell developed some software called NetDrive that can map a WebDAV, FTP, SFTP, etc. share to a windows drive letter. It is now abandonware, so it's no longer maintained (and not available on the Novell website), but it's free to use. I found quite a few available to download by searching for "netdrive.exe" I actually downloaded a few and compared their md5sums to make sure that I was getting a common (and hopefully safe) version.

早在2002年,Novell就开发了一种叫做NetDrive的软件,它可以将WebDAV、FTP、SFTP等文件映射到windows drive信中。它现在被抛弃了,所以它不再被维护(在Novell网站上也没有),但是它可以免费使用。通过搜索“netdrive”,我找到了相当多可用的下载工具。我实际上下载了一些,并比较了他们的md5sum,以确保我得到了一个通用(希望是安全的)版本。

Update 10 Nov 2017 SFTPNetDrive is the current project from the original netdrive project. And they made it free for personal use:

2017年11月10日更新SFTPNetDrive是原netdrive项目的当前项目。他们免费提供给个人使用:

We Made SFTP Net Drive FREE for Personal Use

我们免费提供SFTP网络驱动器供个人使用

They have paid options as well on the website.

他们在网站上也支付了期权。

#2


40  

Dokan looks like a FUSE and sshfs implementation for Windows. If it works as expected and advertised, it would do exactly what you are looking for.

Dokan看起来像是Windows的FUSE和sshfs实现。如果它像预期的那样工作和宣传的那样,它就会做你想做的事。

(Link updated and working 2015-10-15)

(链接更新及工作2015-10-15)

#3


14  

Another, more Windows-y option (for $39) is http://www.expandrive.com/sftpdrive

另一个Windows-y选项(39美元)是http://www.expandrive.com/sftpdrive

#4


12  

The best an easiest solution I found is https://github.com/Foreveryone-cz/win-sshfs, connected servers shows up as a fully functioning network drives.

我发现的最简单的解决方案是https://github.com/Foreveryone-cz/win-sshfs,连接服务器显示为一个功能齐全的网络驱动器。

The install is tricky as you need to also download the correct version of 'dokany', to save myself some time and you I created a ziped files with the right downloads for v1.6.1.13 here. Please take a moment and upvote this issue to make the install simpler in the future: https://github.com/Foreveryone-cz/win-sshfs/issues/166

安装很麻烦,因为您还需要下载“dokany”的正确版本,这样可以节省一些时间,您也可以在这里为1.6.1.1.13创建一个压缩文件,并获得正确的下载。请花一点时间,对这个问题进行投票,使安装在未来变得更简单:https://github.com/Foreveryone-cz/win-sshfs/issues/166

Please note previously this answer stated, http://www.swish-sftp.org/ but I no longer use it.

请注意之前的回答,http://www.swish-sftp.org/,但我不再使用它。

如何通过SSH在Windows中安装远程Linux文件夹?

#5


5  

Take a look at CIFS (http://www.samba.org/cifs/). It is a virtual file system you can run on your linux machine that will allow you to mount folders on your linux machine in windows using SMB.

看看CIFS (http://www.samba.org/cifs/)。它是一个可以在linux机器上运行的虚拟文件系统,允许您使用SMB在linux机器上安装文件夹。

CIFS on linux information can be found here: http://linux-cifs.samba.org/

linux信息上的CIFS可以在这里找到:http://linux-cifs.samba.org/

#6


3  

You need to mount a remote share on your windows machine. This is what Samba/smb is for.

您需要在windows机器上安装远程共享。这就是Samba/smb的用途。

What you'll be doing is turning your Linux box into an SMB server, which lets it share files in a way that plays nice with Windows.

您将要做的是将您的Linux box转换为SMB服务器,使其能够以与Windows兼容的方式共享文件。

If you're not on the same network, you'll need to tunnel this through your SSH connection which may not be worth the effort.

如果您不在同一个网络上,那么需要通过SSH连接来实现这一点,这可能不值得付出努力。

#7


1  

check out Dokan

看看Dokan

https://dokan-dev.github.io/

https://dokan-dev.github.io/

it's iffy, but it works, and it's free

这是不确定的,但它是有效的,而且是免费的

#8


0  

I don't think you can mount a Linux folder as a network drive under windows having only access to ssh. I can suggest you to use WinSCP that allows you to transfer file through ssh and it's free.

我认为您不能将Linux文件夹挂载为windows下的网络驱动器,只能访问ssh。我建议您使用WinSCP,它允许您通过ssh传输文件,而且是免费的。

EDIT: well, sorry. Vinko posted before me and now i've learned a new thing :)

编辑:哦,抱歉。Vinko在我之前发帖,现在我学到一件新东西:

#9


0  

Apparently the free NetDrive software from Novell can access SFTP file servers.

显然,Novell的免费NetDrive软件可以访问SFTP文件服务器。

#10


0  

Second David's answer below: I needed to mount a network drive automatically when users logged in. Dokan SSHFS is a nice tool, but wasn't reliable enough in this case. The copy of Netdrive I found didn't support SSHFS or sftp - not sure if a more recent one does.

第二个大卫的回答是:我需要在用户登录时自动安装网络驱动器。Dokan SSHFS是一个很好的工具,但是在这种情况下不够可靠。我发现Netdrive的拷贝不支持SSHFS或sftp——不确定是否最近的一个。

The solution I'm trialling now involves adding a virtual network adapter (with file sharing disabled), using plink to open a tunnel via the new adapter to the remote machine running SAMBA, and mounting the network drive against the new adapter. There's another useful tutorial here http://www.blisstonia.com/eolson/notes/smboverssh.php.

我正在试验的解决方案包括添加一个虚拟网络适配器(禁用文件共享),使用plink通过运行SAMBA的远程机器的新适配器打开一个隧道,并针对新的适配器安装网络驱动器。这里还有另一个有用的教程http://www.blisstonia.com/eolson/notes/smboverssh.php。

The tunnel and network drive can be set up with a login script, so a few seconds after login users can use the mapped drive without needing to take any action.

可以使用登录脚本设置隧道和网络驱动器,因此登录用户只需几秒钟就可以使用映射驱动器,而无需采取任何操作。