lib/vagrant/ssh.rb
# Checks if this environment's machine is up (i.e. responding to SSH).
#
# @return [Boolean]
Checks if this environment's machine is up .
Checks if this environment ' s machine is up .
def up?
      ssh_port = port
      Timeout.timeout(env.config.ssh.timeout) do
        execute(:timeout => env.config.ssh.timeout,
                :port => ssh_port) { |ssh| }
      end
      true
    rescue Net::SSH::AuthenticationFailed
      raise Errors::SSHAuthenticationFailed
    rescue Timeout::Error, Errno::ECONNREFUSED, Net::SSH::Disconnect,
           Errors::SSHConnectionRefused, Net::SSH::AuthenticationFailed
      return false
    end
def up? ssh_port = port Timeout . timeout ( env . config . ssh . timeout ) do execute ( :timeout => env . config . ssh . timeout , :port => ssh_port ) { | ssh | } end true rescue Net :: SSH :: AuthenticationFailed raise Errors :: SSHAuthenticationFailed rescue Timeout :: Error , Errno :: ECONNREFUSED , Net :: SSH :: Disconnect , Errors :: SSHConnectionRefused , Net :: SSH :: AuthenticationFailed return false end
Checks if this environment's machine is up (i.e.
Checks if this environment ' s machine is up ( i . e .
# We have to determine the port outside of the block since it uses # API calls which can only be used from the main thread in JRuby on # Windows
None
Boolean