diff options
| author | Tim <timothyasir@gluster.com> | 2011-08-09 17:35:55 +0530 |
|---|---|---|
| committer | Tim <timothyasir@gluster.com> | 2011-08-09 17:35:55 +0530 |
| commit | d54f773ac96146a7f5299d276be4778b4c9bf4e2 (patch) | |
| tree | 1088d9e5e280c3c3e250ff11c0c3347b2736d4a0 /src/com.gluster.storage.management.gateway | |
| parent | 4d5151cceea8d9c1472d235994c2938687f3c869 (diff) | |
| parent | 77c32a439727a91972986d18698f27fc46f62e83 (diff) | |
Merge remote branch 'upstream/master'
Diffstat (limited to 'src/com.gluster.storage.management.gateway')
| -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 |
