You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/12/03 10:57:13 UTC

[GitHub] [cloudstack] weizhouapache commented on a change in pull request #5684: (ccc2021 hackathon ) kvm: add hosts using cloudstack ssh private key

weizhouapache commented on a change in pull request #5684:
URL: https://github.com/apache/cloudstack/pull/5684#discussion_r761837071



##########
File path: server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
##########
@@ -259,9 +259,17 @@ private void setupAgentSecurity(final Connection sshConnection, final String age
             sshConnection = new Connection(agentIp, 22);
 
             sshConnection.connect(null, 60000, 60000);
-            if (!sshConnection.authenticateWithPassword(username, password)) {
-                s_logger.debug("Failed to authenticate");
-                throw new DiscoveredWithErrorException("Authentication error");
+
+            final String privateKey = _configDao.getValue("ssh.privatekey");

Review comment:
       @sureshanaparti 
   isn't it better to support both ? hosts are still manageable if one of the authentication fails.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org