Add support for GOW (GNU on Windows) #1518

Closed
taylorlapeyre opened this Issue Mar 29, 2013 · 7 comments

5 participants

@taylorlapeyre

I was recently trying to ensure that my vagrant project would work well on my Windows computer, which has (the vastly superior) gow installed for using unix commands.

While one of these commands is ssh, I ran into this error when running vagrant ssh:

plink: unknown option "-p"

I believe the problem leads back to this code in the ssh command.

Considering that gow is such a useful utility and how I think it fits very well into the core premise of Vagrant, I think it would be a great idea to provide support for it. At the very least, I think adding support for ssh.exe on Windows would be a great start.

@cmur2

I have the same problem when using the PuTTY plink.exe on Windows, would be nice to have a fix :)

@kolen

GOW has ssh.bat (installed in PATH) that just starts plink (from putty, included with GOW). It is very different from openssh's ssh client, but some command-line options are similar. It does not support -p.

Supporting putty in addition to openssh may be ok, but detecting if ssh executable in PATH is either openssh or putty may be tricky. Maybe GOW's approach of making ssh executable the same as plink is not good.

@mitchellh
Owner

Yeah, this seems fairly tricky. It may be better to actually allow the user to customize the SSH command used...

@flyisland

Got the same issue with Win7 Pro SP1 and Vagrant 1.1.5! Is there any workaround solution, which SSH application I should install?

INFO ssh: Invoking SSH: ["vagrant@127.0.0.1", "-p", "2222", "-o", "LogLevel=FATAL", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-o", "IdentitiesOnly=yes", "-i", "C:/Users/ischen/.vagrant.d/insecure_private_key"]
plink: unknown option "-p"
@kolen

@flyisland workaround is to install openssh client on Windows: msys, cygwin, separate package, also it is included in git package. And its ssh binary should override ssh.bat from GOW in PATH (or you can delete ssh.bat from GOW directory).

GOW does not support PuTTY instead of openssh. GOW uses PuTTY (I think it would be better if GOW included openssh as its default ssh client).

@flyisland

@kolen , got it, thanks.

@mitchellh
Owner

I've added detection for PuTTY link and will show an error on Windows. The issue is that Vagrant uses OpenSSH-style private keys, and plink isn't compatible with these. PuTTY itself doesn't have a command-line client to converting, so Vagrant can't currently do this automatically.

@mitchellh mitchellh closed this Apr 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment