Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Forked from haf/gist:2843680
Created March 6, 2013 21:10
Show Gist options
  • Save jmeridth/5103108 to your computer and use it in GitHub Desktop.
Save jmeridth/5103108 to your computer and use it in GitHub Desktop.

If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.

Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb to comment out the faulty Windows check and add a real SSH check:

# if Util::Platform.windows?
  # raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
                                       # :port => ssh_info[:port],
                                       # :username => ssh_info[:username],
                                       # :key_path => ssh_info[:private_key_path]
# end

which = Util::Platform.windows? ? "where ssh >NUL 2>&1" : "which ssh >/dev/null 2>&1"
raise Errors::SSHUnavailable if !Kernel.system(which)

Now you can do vagrant ssh. Happy camper again!

@jmeridth
Copy link
Author

jmeridth commented Mar 6, 2013

In Vagrant 1.0.6, the location of this file is now:

C:\vagrant\vagrant\embedded\gems\gems\vagrant-1.0.6.dev\lib\vagrant\ssh.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment