diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java index 7c14bf52..9f5e1072 100644 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java +++ b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/SshUtil.java @@ -131,12 +131,14 @@ public class SshUtil { outputStream.close(); } catch (Exception e) { throw new GlusterRuntimeException("Couldnt append file [" + localTempFile + "] with public key!", e); - } + } try { scpClient.put(localTempFile.getAbsolutePath(), SSH_AUTHORIZED_KEYS_FILE, SSH_AUTHORIZED_KEYS_DIR_REMOTE, "0600"); } catch (IOException e) { throw new GlusterRuntimeException("Couldn't add public key to server [" + serverName + "]", e); + } finally { + localTempFile.delete(); } // It was decided NOT to disable password login as this may not be acceptable in a bare-metal environment |
