diff --git a/src/sunstone/models/sunstone_guac.rb b/src/sunstone/models/sunstone_guac.rb index 7c7507fcb8..8f3f83f673 100644 --- a/src/sunstone/models/sunstone_guac.rb +++ b/src/sunstone/models/sunstone_guac.rb @@ -207,11 +207,8 @@ class SunstoneGuac < SunstoneRemoteConnections end private_key = user['TEMPLATE/SSH_PRIVATE_KEY'] - - if private_key.nil? - error_message = 'SSH_PRIVATE_KEY not present in the USER:'\ - "#{OpenNebula::User::SELF} TEMPLATE" - return { :error => error(400, error_message) } + if !private_key.nil? + hash['private-key'] = private_key end passphrase = user['TEMPLATE/SSH_PASSPHRASE'] @@ -219,7 +216,6 @@ class SunstoneGuac < SunstoneRemoteConnections hash['passphrase'] = passphrase end - hash['private-key'] = private_key end {