diff --git a/lib/vagrant/command/ssh.rb b/lib/vagrant/command/ssh.rb index 41f597255..3c4b67df9 100644 --- a/lib/vagrant/command/ssh.rb +++ b/lib/vagrant/command/ssh.rb @@ -68,7 +68,7 @@ module Vagrant def ssh_connect(vm, opts) @logger.debug("`exec` into ssh prompt") - vm.ssh.connect(opts) + vm.ssh.exec(opts) end end end diff --git a/lib/vagrant/ssh.rb b/lib/vagrant/ssh.rb index de61cbf30..800661e5f 100644 --- a/lib/vagrant/ssh.rb +++ b/lib/vagrant/ssh.rb @@ -5,9 +5,8 @@ require 'vagrant/util/platform' require 'vagrant/util/safe_exec' module Vagrant - # Manages SSH access to a specific environment. Allows an environment to - # replace the process with SSH itself, run a specific set of commands, - # upload files, or even check if a host is up. + # Manages SSH connection information as well as allows opening an + # SSH connection. class SSH include Util::SafeExec @@ -47,12 +46,12 @@ module Vagrant end # Connects to the environment's virtual machine, replacing the ruby - # process with an SSH process. This method optionally takes a hash - # of options which override the configuration values. - # One specific option, :port_only, if set to true, will cause this method - # to skip filling in some default values, such as private_key_path and - # username. - def connect(opts={}) + # process with an SSH process. + # + # @param [Hash] opts Options hash + # @options opts [Boolean] :plain_mode If True, doesn't authenticate with + # the machine, only connects, allowing the user to connect. + def exec(opts={}) # Get the SSH information and cache it here ssh_info = info