Open whren opened 8 years ago
Hi @whren. Thanks for looking at this. I was aware of issue 1 that you raise and had a branch in my local repo to address it but then got buried by other work.
As for issue 2 that you raise, this is interesting. I am quite interested to see if this solves #24. I certainly hope that it does, but I have my doubts that it will.
I am travelling on holiday for the rest of this week. I hope to look into these issues next week so please be patient. Thanks again!
hey @whren i have a new pre-release of vagrant-sshfs out which I think addresses at least one of your issues. Can you test it out to see:
here is how to test:
vagrant plugin uninstall vagrant-sshfs
wget https://dustymabe.fedorapeople.org/gem/vagrant-sshfs-1.1.0.dev.gem
vagrant plugin install ./vagrant-sshfs-1.1.0.dev.gem
New release is out. Can you try against 1.2.0? https://github.com/dustymabe/vagrant-sshfs/releases/tag/v1.2.0
hey @whren - can you test this with the new releases and see if your problem is fixed?
Note I'm testing on version 1.3.0 (with Vagrant 1.9.2) and am having trouble getting anything working through Cygwin.
Also, cross referencing #70.
I'm on vagrant-sshfs 1.3.0 with Vagrant 1.9.5 and this is still not working from what I can tell with Powershell and Windows openssh (via choco install). I'm really struggling to find a single vagrant config that will work with Windows, OSX and Linux. Seems nigh impossible ATM.
@TonyApuzzo for the most part, Drupal VM's defaults work across all. But the filesystem performance by default on Windows is pretty slow.
With Windows 10 "developer mode" port 22 is taken by microsoft's fake SSH server. You have to use a different port, so I installed openssh on a different port via choco install openssh -params "/SSHServerFeature /SSHServerPort:8022 /OverWriteSSHDConf /DeleteServerKeysAfterInstalled" -y
and then put ssh_opts_append:'-p8022'
in my Vagrantfile synced_folder . Without the arg it hangs trying to mount and with it, it fails to mount quickly. Something is screwy because the 'slave' mount should reuse the connection from what I understand it shouldn't even matter what port SSH on my host is running. "sftp-server.exe" is in my PATH.
Yeah, theoretically you shouldn't need ssh server running at all on the host so ports shouldn't matter. I'll have to look into this more when I bug scrub - it's taken forever for that, sorry guys.
I figured out why it was failing for me. I had git installed and it was first in my PATH. When I put the Windows openssh path first it started working. vagrant up was running git's version of ssh which hangs -- not sure if this can be considered a bug or not. Of course this might have other consequences down the road with running git from the windows command line, but I almost never do this anyway. Running git from the git bash shell is unaffected. For now I'm G2G.
Under windows (7 in my case), I faced 2 issues in making vagrant-sshfs v1.1.0 work with a dos shell with openssh port for win32/64 (https://github.com/PowerShell/Win32-OpenSSH)
1 - PATH environment variable wrongly appended in "lib/vagrant-sshfs/synced_folder.rb#find_executable" : The test case for windows platform implies to be under cygwin. In case of dos shell we fall into the else case and gets the PATH environment variable appended with unix paths separator ':' wich fail the plugin into finding ssh/sftp-server executables.
Windows platform and cygwin conditions needs to be separated.
Proposed patch :
2 - Wrong SSH options passed on command line in "lib/vagrant-sshfs/cap/linux/sshfs_mount.rb#sshfs_slave_mount" : ssh_opts get appended with "-o UserKnownHostsFile" and "-F " set to "/dev/null" in order to respectively disable SSH host key checking and not pick up options from user's config. In the case of dos shell "/dev/null" needs to be replaced by "NUL".
Windows platform and not cygwin conditions needs to be introduced there.
Proposed patch :
With those patches, I've been able to mount synced folder with openssh 32 bit port for windows, under windows 7. Sorry I can't make a PR at the moment.