How to mount with options using command-line (Windows 7)

1,445 views
Skip to first unread message

Abdulaziz

unread,
May 11, 2018, 2:57:25 PM5/11/18
to WinFsp
Hi,

I’m using winfsp on windows 7. Using the windows mount network drive e.g. \\sshfs\user@server works nicely.

However, I want to use it with custom ssh command .e.g. to use keys or change encryption...etc.

I would appreciate if someone posts an example on how to do that using command-line.

Thank you,

Bill Zissimopoulos

unread,
May 11, 2018, 4:42:48 PM5/11/18
to Abdulaziz, WinFsp
SSHFS-Win includes a copy of regular sshfs. It can be found under \Program
Files\SSHFS-Win\bin in the default installation.

The regular SSHFS command line options can be used. Information on those
options is available online (search for man sshfs or visit
https://linux.die.net/man/1/sshfs). For “mountpoint” you can use a drive
(e.g. X:).

Unfortunately you cannot currently use any of these options with the
\\sshfs\user@server syntax. You must use the command line, a batch file,
or SiriKali, which is a third party tool that allows easy management of
SSHFS.

https://github.com/mhogomchungu/sirikali/releases/latest


Bill
>--
>You received this message because you are subscribed to the Google Groups
>"WinFsp" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to winfsp+un...@googlegroups.com.
>To post to this group, send email to win...@googlegroups.com.
>Visit this group at https://groups.google.com/group/winfsp.
>For more options, visit https://groups.google.com/d/optout.

Abdulaziz

unread,
May 12, 2018, 3:43:19 AM5/12/18
to WinFsp
Thanks Bill, 

So, what is the underlying sshfs command line that gets executed when \\sshfs\user@server syntax is used during the network mount command?

I'm fine with running it using a batch file, I just need the command/options as starting point then I'll modify as needed, 

Thanks again, 

Abdulaziz

unread,
May 15, 2018, 11:28:28 AM5/15/18
to WinFsp
Never mind, I figured it out,
sshfs.exe  -f -o rellinks  -o password_stdout -o fstypename=SSHFS  -o StrictHostKeyChecking=no -o uid=197608,gid=197121 --VolumePrefix=\sshfs\USER_ID@IP_ADDRESS -o Port=22  USER_ID@IP_ADDRESS:  X:

Best regards, 

Bill Zissimopoulos

unread,
May 15, 2018, 11:59:01 AM5/15/18
to Abdulaziz, WinFsp
Sorry, for the delay. Yes, this command line looks correct.

Some comments:
  • You probably do not need the `–o password_stdout` option. This is a special option that I added to SSHFS to support mapping a network drive through the explorer and is used to respond “OK” when then password is correct.
  • The option `-o uid=XXX,gid=YYY` can also be `-o uid=-1,gid=-1`, which will make files owned by the user who mounts the file system. Another option is `-o idmap=user` which maps local users to remote users (if the usernames match, see man sshfs).
Bill



To unsubscribe from this group and stop receiving emails from it, send an email to winfsp+un...@googlegroups.com.

Abdulaziz

unread,
May 15, 2018, 3:05:19 PM5/15/18
to WinFsp
Great! thanks for the hints, 

Pedro Serrano

unread,
Mar 3, 2021, 12:40:00 PM3/3/21
to WinFsp
Similar question about using WinFSP with VirtioFS in a Windows 10 kvm/qemu guest.   Is there a way to specify which drive letter will be used?   I tried using mountvol, diskmgmt.msc, diskpart to change drive letters, none worked.

>To post to this group, send email to win...@googlegroups.com.
>Visit this group at https://groups.google.com/group/winfsp.
>For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "WinFsp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to winfsp+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages