[SSHD-383] Support for loading ecdsa keys in the client demo Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/3b1308e8 Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/3b1308e8 Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/3b1308e8
Branch: refs/heads/master Commit: 3b1308e8f17e042d13c9a2ef63675b1939efe0fd Parents: 71ad6a0 Author: Guillaume Nodet <[email protected]> Authored: Fri Dec 12 10:50:51 2014 +0100 Committer: Guillaume Nodet <[email protected]> Committed: Fri Dec 12 10:50:51 2014 +0100 ---------------------------------------------------------------------- sshd-core/src/main/java/org/apache/sshd/SshClient.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/3b1308e8/sshd-core/src/main/java/org/apache/sshd/SshClient.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/SshClient.java b/sshd-core/src/main/java/org/apache/sshd/SshClient.java index ef34288..7156bf0 100644 --- a/sshd-core/src/main/java/org/apache/sshd/SshClient.java +++ b/sshd-core/src/main/java/org/apache/sshd/SshClient.java @@ -474,6 +474,10 @@ public class SshClient extends AbstractFactoryManager implements ClientFactoryMa if (f.exists() && f.isFile() && f.canRead()) { files.add(f.getAbsolutePath()); } + f = new File(System.getProperty("user.home"), ".ssh/id_ecdsa"); + if (f.exists() && f.isFile() && f.canRead()) { + files.add(f.getAbsolutePath()); + } if (files.size() > 0) { // SSHD-292: we need to use a different class to load the FileKeyPairProvider // in order to break the link between SshClient and BouncyCastle
