sshfs-win
sshfs-win copied to clipboard
Can't map drive inside Explorer or with NET USE
I'm trying to map a drive to my NAS using SSHFS-Win. From Explorer or CMD I can't get it to work and it throws the following error:
PS C:\Program Files\SSHFS-Win\bin> net use X: \\sshfs\[email protected]\Data
The password is invalid for \\sshfs\[email protected]\Data.
Enter the user name for 'sshfs': admin
Enter the password for sshfs:
System error 5 has occurred.
Access is denied.
But it works pretty much fine with:
sshfs -d -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o Port=22 -o idmap=admin -o cache_timeout=1 -o FileInfoTimeout=-1 -o DirInfoTimeout=1000 [email protected]:/Data M:
And it also works fine using SSHFS-Win Manager.
Any idea on where to start debugging?
Thank you!
it may seem strange but try to launch the command from an elevated administrator command prompt as a starting point :-)
https://www.windows-commandline.com/system-error-5-has-occurred/
it may seem strange but try to launch the command from an elevated administrator command prompt as a starting point :-)
https://www.windows-commandline.com/system-error-5-has-occurred/
I already tried that, and still doesn't work :( I was so much looking forward on ditching Samba
I have same issue on windows 10 trying to connect to my android phone via ssh.
Found the problem here, at least for me - it was on the server side. I needed to add some sftp specific config in sshd_config and it finally connected. Steps:
- Create a group, for instance
sftp
- Add the user you will connect with to it
- Add something like this to the end of your
sshd_config
:
Match group sftp
ChrootDirectory [whatever folder you want to mount]
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
This should be enough to connect, though you might need to enable PasswordAuthentication
too, if you prefer it (I used public key).
Confirming also, tried all recommendations and still receive the error.
It seems like this is hard-coded to use port 22 only.
That's a ridiculous design decision, @billziss-gh !!!! Some of us use unrooted Androids (because Motorola is a big POS and will not let me unlock my bootloader to root -- that's a different thing) and I have to use a non-standard port.
HOW the F*** do I connect with this POS???
Can confirm that changing the port from my NAS' SFTP settings to 22 fixes this.