Skip to content

SSHFS on Windows

Sam Sammandam edited this page Mar 24, 2019 · 1 revision

Introduction

SSHFS is just awesome to quickly transfer your files between servers that is already providing SSH service, without complexity of administering NFS or SMB shares. In this article, we will show you how to do use SSHFS on Windows that is provided with Crossmeta FUSE

Installing SSHFS

Crossmeta FUSE provides the same SSHFS that is available in Linux. Once SSHFS is deployed the folder becomes part of the windows drives and is visible to all applications on the system, just not for the explorer. Get the latest release and install on your Windows.

Make sure Crossmeta FUSE driver is loaded

cd c:\program files\crossmeta
service_crossmeta status
C:\Program Files\crossmeta>service_crossmeta status
cxvfs is RUNNING
cxfuse is RUNNING
cxnfs is STOPPED
cxhfs is STOPPED
cxvfsmgr is STOPPED
C:\Program Files\crossmeta>

If needed load the cxfuse module as follows

net start cxfuse

Launch sshfs to mount the remote file system

Pick a destination folder on Crossmeta V drive to mount the remote directory using SSHFS. For example v:\mnt\work is /mnt/work to Crossmeta Apps.

mkdir v:\mnt\work
C:\Program Files\crossmeta>sshfs [email protected]: /mnt/work
Createprocess: _plink.exe  -a  -2  [email protected]  -s  sftp
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 aa:40:08:ca:61:30:d1:54:b2:27:22:a2:ba:f3:12:1d
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) y
[email protected]'s password:
Sorry run in background not supported.

The above message Sorry run in background not supported means the command window is now dedicated to sshfs operation and you have to launch another command window for your use.

The sshfs folder is now available as V:\mnt\work to all Windows programs and Crossmeta namespace is /mnt/work

Umounting the remote directory

Whne no longer needed simply umount it with the command unmount /mnt The above operation may not succeed if there are any active references to the files in the remote directory. In that case close the applications that is actively using them and then retry the unmount operation.

Using the vfsadmin GUI program

The vfsadmin also provides SSHFS mount operation in a convenient GUI dialog for accessing remote directory using the sshfs fuse mechanism as described above.