Fix ppk path by just... not using ppk anymore. [GH-634]

This commit is contained in:
Mitchell Hashimoto 2012-01-12 18:03:35 -08:00
parent 3834930189
commit 6d212efdbd
4 changed files with 19 additions and 44 deletions

View File

@ -1,26 +0,0 @@
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: imported-openssh-key
Public-Lines: 6
AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+k
z4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdO
KLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4
O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGj
yiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPK
cF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ==
Private-Lines: 14
AAABAQDiKpY8le3NkDryYp0QuziMmx3KTL57B1l412zm2NycdTnNRgTbkr598kQP
2pRYgJwtkNzzVMZaMfICoPUHDtemBTAWB5QnBSXNC6sC/7/JKfGLC5oYl+EUzUJp
AfN9emGBWaX59lS+clRO/N9MrYuDoR1tQT1NqtSUF//E9+4SExKUgTmR5v9nPf8t
SVGDzIOrPnD5BZUni62cqcqKrBk3SbCnBTthLImGVPhhXUXefhiMuzAznAmzaiqb
SOyxC78FPS3IRc0NgEsQXgCwKVpa5InaSOrsqGuthfNqCqGdJ6L04NgVKEm7xRZV
5zciFvlleXM7q901DUn1ex/ib7bLAAAAgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/
orApiHmHDsURs5rUKDx0f9iPcXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsM
kE4CUSiJcYrMANtx54cGH7RkEjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTG
yAK+OLD3M2QdCQAAAIEA7cfKTQgMUe8oR2yFk9QB+uvl1jfG16u5d0Tv7pHmnIvf
CX5G5MVEWYbcVfxx7r1IZzy3V908MoDwWGRTaOKc1RIc1qE7ZxLaxbniscnN/i42
abqPpgZUOjkbX4JK/YAVaYV2RmBM5Ag95VXZfC+HMPQVaSqyQrNXObWhow4HSJ0A
AACANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH+vq/
5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQNE5O
gEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
Private-MAC: bc710f345e67c736d57dd72aab10fe4625345dae

View File

@ -4,6 +4,7 @@ require 'fileutils'
require 'log4r'
require 'vagrant/util/file_mode'
require 'vagrant/util/platform'
module Vagrant
# Represents a single Vagrant environment. A "Vagrant environment" is
@ -470,9 +471,13 @@ module Vagrant
@default_private_key_path)
end
if Util::FileMode.from_octal(@default_private_key_path.stat.mode) != "600"
@logger.info("Changing permissions on private key to 0600")
@default_private_key_path.chmod(0600)
if !Util::Platform.windows?
# On Windows, permissions don't matter as much, so don't worry
# about doing chmod.
if Util::FileMode.from_octal(@default_private_key_path.stat.mode) != "600"
@logger.info("Changing permissions on private key to 0600")
@default_private_key_path.chmod(0600)
end
end
end

View File

@ -56,8 +56,10 @@ module Vagrant
ssh_info = info
if Util::Platform.windows?
raise Errors::SSHUnavailableWindows, :key_path => ssh_info[:private_key_path],
:ssh_port => ssh_info[:port]
raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
:port => ssh_info[:port],
:username => ssh_info[:username,
:key_path => ssh_info[:private_key_path]
end
raise Errors::SSHUnavailable if !Kernel.system("which ssh > /dev/null 2>&1")

View File

@ -132,20 +132,14 @@ en:
guest port value, or specify an explicit SSH port with `config.ssh.port`.
ssh_unavailable: "`ssh` binary could not be found. Is an SSH client installed?"
ssh_unavailable_windows: |-
`vagrant ssh` isn't available on the Windows platform. The
vagrant.ppk file for use with Putty is available at:
%{key_path}.ppk
To use this create a new Putty session for `vagrant@localhost`
on port `%{ssh_port}`, in the Connection>SSH>Auth
configuration section navigate to the vagrant.ppk file,
select it, save the session for later use, and connect.
For a more detailed guide please consult:
http://vagrantup.com/docs/getting-started/setup/windows.html
`vagrant ssh` isn't available on the Windows platform. You are still able
to SSH into the virtual machine if you get a Windows SSH client (such as
PuTTY). The authentication information is shown below:
Host: %{host}
Port: %{port}
Username: %{username}
Private key: %{key_path}
vagrantfile_exists: |-
`Vagrantfile` already exists in this directory. Remove it before
running `vagrant init`.