From c70238250e25843629fd8c53e42bc3a8d34b9cfe Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 2 Oct 2013 10:38:13 +0200 Subject: SSHClient: Allow to use ECDSA private keys. Nowadays, ECDSA keys became more widespread, so it might be a good idea to support those private keys as well. Signed-off-by: aszlig --- paramiko/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paramiko/client.py b/paramiko/client.py index c5a2d1ac..f314a4cb 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -30,6 +30,7 @@ from paramiko.agent import Agent from paramiko.common import * from paramiko.config import SSH_PORT from paramiko.dsskey import DSSKey +from paramiko.ecdsakey import ECDSAKey from paramiko.hostkeys import HostKeys from paramiko.resource import ResourceManager from paramiko.rsakey import RSAKey @@ -457,7 +458,7 @@ class SSHClient (object): if not two_factor: for key_filename in key_filenames: - for pkey_class in (RSAKey, DSSKey): + for pkey_class in (RSAKey, DSSKey, ECDSAKey): try: key = pkey_class.from_private_key_file(key_filename, password) self._log(DEBUG, 'Trying key %s from %s' % (hexlify(key.get_fingerprint()), key_filename)) -- cgit v1.2.3