VM raises SSHPortNotDetected if ssh_info can't get the port
Also, I updated the wording on that error message a bit since it turns out that it is possible through user error that there will be no SSH port.
This commit is contained in:
parent
80ca6e1e7f
commit
47a368fbfd
|
@ -87,6 +87,10 @@ module Vagrant
|
||||||
:forward_x11 => config.ssh.forward_x11
|
:forward_x11 => config.ssh.forward_x11
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This can happen if no port is set and for some reason Vagrant
|
||||||
|
# can't detect an SSH port.
|
||||||
|
raise Errors::SSHPortNotDetected if !results[:port]
|
||||||
|
|
||||||
# Determine the private key path, which is either set by the
|
# Determine the private key path, which is either set by the
|
||||||
# configuration or uses just the built-in insecure key.
|
# configuration or uses just the built-in insecure key.
|
||||||
pk_path = config.ssh.private_key_path || env.default_private_key_path
|
pk_path = config.ssh.private_key_path || env.default_private_key_path
|
||||||
|
|
|
@ -109,9 +109,16 @@ en:
|
||||||
|
|
||||||
%{key_path}
|
%{key_path}
|
||||||
ssh_port_not_detected: |-
|
ssh_port_not_detected: |-
|
||||||
Vagrant couldn't determine the SSH port for your VM! This is a rare,
|
Vagrant couldn't determine the SSH port for your VM! Vagrant attempts to
|
||||||
exceptional event, and a bug should be filed. Please try recreating your
|
automatically find a forwarded port that matches your `config.ssh.guest_port`
|
||||||
VM (vagrant destroy, then vagrant up). Sorry!
|
(default: 22) value and uses this for SSH. Alternatively, if `config.ssh.port`
|
||||||
|
is set, it will use this.
|
||||||
|
|
||||||
|
However, in this case Vagrant was unable to find a forwarded port that matches
|
||||||
|
the guest port and `config.ssh.port` is not set!
|
||||||
|
|
||||||
|
Please make sure that you have a forwarded port that goes to the configured
|
||||||
|
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: "`ssh` binary could not be found. Is an SSH client installed?"
|
||||||
ssh_unavailable_windows: |-
|
ssh_unavailable_windows: |-
|
||||||
`vagrant ssh` isn't available on the Windows platform. The
|
`vagrant ssh` isn't available on the Windows platform. The
|
||||||
|
|
Loading…
Reference in New Issue