diff --git a/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java b/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java index 0184a44ff39..f5bba77b2ab 100644 --- a/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java +++ b/server/src/main/java/org/apache/cloudstack/diagnostics/DiagnosticsServiceImpl.java @@ -340,8 +340,8 @@ public class DiagnosticsServiceImpl extends ManagerBase implements PluggableServ File dataDirectory = new File(dataDirectoryInSecondaryStore); boolean existsInSecondaryStore = dataDirectory.exists() || dataDirectory.mkdir(); if (existsInSecondaryStore) { - // scp from system VM to mounted sec storage directory - File permKey = new File("/var/cloudstack/management/.ssh/id_rsa"); + String homeDir = System.getProperty("user.home"); + File permKey = new File(homeDir + "/.ssh/id_rsa"); SshHelper.scpFrom(vmSshIp, 3922, "root", permKey, dataDirectoryInSecondaryStore, diagnosticsFile); }