winfsp / sshfs-win

SSHFS For Windows
https://winfsp.dev
Other
4.78k stars 250 forks source link

Unable to map network drive with custom named private key #434

Open RareScrap opened 2 weeks ago

RareScrap commented 2 weeks ago

I want to map network drive in the Windows 11 Explorer UI using a custom named private key file, but SSHFS-Win refuses to connect: 2024-06-22_12-12-58

The readme suggests to define an alias to the host. I've defined it in C:\Users\my_windows_user\.ssh\config:

Host my_domain.com
   User my_remote_user
   HostName my_domain.com
   PreferredAuthentications publickey
   IdentityFile C:\Users\my_windows_user\.ssh\my_private_key

PowerShell successfully connects to the host using provided private key so I'm sure my config is right:

PS C:\Users\my_windows_user> ssh my_remote_user@my_domain.com
Last login: *** from ***.***.***.***
[my_remote_user@my_domain.com ~]$

But SSHFS-Win can't do the same for some reason when I'm trying to set it up in Windows 11 Explorer UI. I'm using bat-script workaround to map drives but I don't want to keep a bat-file for this:

start "my_remote_user@my_domain.com" "C:\Program Files\SSHFS-Win\bin\sshfs-win.exe" svc \sshfs.k\my_remote_user@my_domain.com Z:

So the question is - How to map network drive in the Windows 11 Explorer UI using a custom named private key file?

arnav-kr commented 3 days ago

Facing the same issue