1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

sshable? shouldn't just die

This commit is contained in:
Nat Welch 2013-06-20 18:01:03 -07:00
parent a39e976a57
commit 99fac66767
2 changed files with 2 additions and 3 deletions

View file

@ -105,7 +105,6 @@ module Fog
def build_result(api_method, parameters, body_object=nil)
if body_object
#p api_method, parameters
result = @client.execute(
:api_method => api_method,
:parameters => parameters,

View file

@ -86,13 +86,13 @@ module Fog
def sshable?(options={})
# Then check if we have ssh keys set up.
if not metadata['sshKeys']
if ready? and not metadata['sshKeys']
setup
end
# Now make sure everything is ok.
ready? && !public_ip_address.nil? && public_key && metadata['sshKeys'] && !!Timeout::timeout(8) { ssh('pwd', options) }
rescue SystemCallError, Net::SSH::AuthenticationFailed, Timeout::Error
rescue SystemCallError, Net::SSH::AuthenticationFailed, Timeout::Error, ArgumentError
false
end