Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Forked from haf/gist:2843680
Created March 6, 2013 21:10
Show Gist options
  • Select an option

  • Save jmeridth/5103108 to your computer and use it in GitHub Desktop.

Select an option

Save jmeridth/5103108 to your computer and use it in GitHub Desktop.

Revisions

  1. @haf haf revised this gist May 31, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    If you are using vagrant, you probably, statistically you are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.
    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:

  2. @haf haf revised this gist May 31, 2012. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -3,15 +3,15 @@ If you are using vagrant, you probably, statistically you are using git. Make su
    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:

    ```ruby
    # 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
    # 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)
    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!
  3. @haf haf created this gist May 31, 2012.
    17 changes: 17 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    If you are using vagrant, you probably, statistically you 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:

    ```ruby
    # 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!