B #5241: Bug fix ssh private key (#1347)

(cherry picked from commit c5b4445709)
This commit is contained in:
Frederick Borges authored and Tino Vazquez committed 2021-07-01 18:56:35 +02:00
1 parent 14a0c04750
commit a05dcd0254
1 file changed
+2 -6
+2 -6
View File
@@ -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
{