You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2020/04/04 20:45:12 UTC
[libcloud] 10/21: Fix typo and use password instead of passphrase.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch 2.8.x
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit c48e0e5bb516d0987af47d06ce0b374afdfc2f2a
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Wed Apr 1 20:50:25 2020 +0200
Fix typo and use password instead of passphrase.
---
libcloud/compute/ssh.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py
index cd702c3..887a4e1 100644
--- a/libcloud/compute/ssh.py
+++ b/libcloud/compute/ssh.py
@@ -283,7 +283,7 @@ class ParamikoSSHClient(BaseSSHClient):
if self.key_material:
conninfo['pkey'] = self._get_pkey_object(
key=self.key_material,
- passpharse=self.key_password)
+ password=self.password)
if not self.password and not (self.key_files or self.key_material):
conninfo['allow_agent'] = True
@@ -303,7 +303,7 @@ class ParamikoSSHClient(BaseSSHClient):
try:
pkey = self._get_pkey_object(key=key_material,
- passpharse=self.key_password)
+ password=self.password)
except paramiko.ssh_exception.PasswordRequiredException as e:
raise e
except Exception:
@@ -516,7 +516,7 @@ class ParamikoSSHClient(BaseSSHClient):
result.write(result_bytes.decode('utf-8'))
return result
- def _get_pkey_object(self, key, passpharse=None):
+ def _get_pkey_object(self, key, password=None):
"""
Try to detect private key type and return paramiko.PKey object.
@@ -552,12 +552,12 @@ class ParamikoSSHClient(BaseSSHClient):
key_value = key
try:
- key = cls.from_private_key(StringIO(key_value), passpharse)
+ key = cls.from_private_key(StringIO(key_value), password)
except paramiko.ssh_exception.PasswordRequiredException as e:
raise e
except (paramiko.ssh_exception.SSHException, AssertionError) as e:
if 'private key file checkints do not match' in str(e).lower():
- msg = ('Invalid passpharse provided for encrypted key. '
+ msg = ('Invalid password provided for encrypted key. '
'Original error: %s' % (str(e)))
# Indicates invalid password for password protected keys
raise paramiko.ssh_exception.SSHException(msg)