Closed Swift42 closed 3 months ago
@Swift42 this seems significant enough that should be added to the README?
@Swift42 this seems significant enough that should be added to the README?
I would say yes, because I was annoyed by the constant timeouts (disconnects) and I spent some hours to figure out how to prevent this. I first tried to set the parameter in %USERPROFILE%.ssh\config, but this didn't work. It works when you call "sshfs-win svc" manually (and add the parameter), but IMO it is more convenient and better to simply use "net use" with the registry patch from above.
Would you want to make a PR adding this information to the README?
Would you want to make a PR adding this information to the README?
I created a PR with a modified README and a registry patch file for all 4 services (sshfs, sshfs.k, sshfs.kr, sshfs.r).
When you connect a drive letter via "net use", the connection will timeout after some minutes and you need to reconnect it again. This means: You have to use "net use" again (on a non-persistent connection) or you need to click again on the drive in explorer (on a persistent connection).
This can be prevented by modifying the registry - by appending " -o ServerAliveInterval=30" to "CommandLine" in HKLM\SOFTWARE\WOW6432Node\WinFsp\Services\sshfs (or sshfs.k/sshfs.kr/sshfs.r if you use this variant).
Here is a registry command file for the standard "sshfs" variant: