libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [4/6] git commit: Add a docstring which clariries how the auth works.
Date Wed, 08 Jan 2014 23:26:30 GMT
Add a docstring which clariries how the auth works.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2fca84c7
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2fca84c7
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2fca84c7

Branch: refs/heads/trunk
Commit: 2fca84c766e84c72db0a187baff99f988a001925
Parents: 039cb79
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Wed Jan 8 23:55:05 2014 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Thu Jan 9 00:06:19 2014 +0100

----------------------------------------------------------------------
 libcloud/compute/ssh.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/2fca84c7/libcloud/compute/ssh.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py
index 6b814ec..c4dec9b 100644
--- a/libcloud/compute/ssh.py
+++ b/libcloud/compute/ssh.py
@@ -164,6 +164,19 @@ class ParamikoSSHClient(BaseSSHClient):
     """
     def __init__(self, hostname, port=22, username='root', password=None,
                  key=None, timeout=None):
+        """
+        Note #1 `password` and `key` arguments are not mutually exclusive and
+        you can specify both. If you specify both, authentication is attempted
+        in the following order:
+
+        - The key passed in (if any)
+        - Any key we can find through an SSH agent
+        - Any "id_rsa" or "id_dsa" key discoverable in ~/.ssh/
+        - Plain username/password auth, if a password was given
+
+        Note #2: If a password protected key is user, `password` argument
+        represents a password which will be used to unlock the key file.
+        """
         super(ParamikoSSHClient, self).__init__(hostname, port, username,
                                                 password, key, timeout)
         self.client = paramiko.SSHClient()


Mime
View raw message