From 865bd10d80231ae8457f54c7f98f48892732ecce Mon Sep 17 00:00:00 2001 From: Alan Yee Date: Mon, 1 Aug 2016 11:33:05 -0700 Subject: Update README.rst Removing deprecated alias. Updating demo script in the README. --- README.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index ab48ed95..54c2a02f 100644 --- a/README.rst +++ b/README.rst @@ -86,20 +86,21 @@ Demo ---- Several demo scripts come with Paramiko to demonstrate how to use it. -Probably the simplest demo of all is this:: +Probably the simplest demo is this:: - import paramiko, base64 - key = paramiko.RSAKey(data=base64.decodestring('AAA...')) + import base64 + import paramiko + key = paramiko.RSAKey(data=base64.b64decode(b'AAA...')) client = paramiko.SSHClient() client.get_host_keys().add('ssh.example.com', 'ssh-rsa', key) client.connect('ssh.example.com', username='strongbad', password='thecheat') stdin, stdout, stderr = client.exec_command('ls') for line in stdout: - print '... ' + line.strip('\n') + print('... ' + line.strip('\n')) client.close() This prints out the results of executing ``ls`` on a remote server. The host -key 'AAA...' should of course be replaced by the actual base64 encoding of the +key b'AAA...' should of course be replaced by the actual base64 encoding of the host key. If you skip host key verification, the connection is not secure! The following example scripts (in demos/) get progressively more detailed: -- cgit v1.2.3 From 6fda45896496610bdf21e99b935e0c575c9cdde0 Mon Sep 17 00:00:00 2001 From: Alan Yee Date: Mon, 1 Aug 2016 11:34:51 -0700 Subject: Update demo_server.py Updating base64 code in comments --- demos/demo_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/demo_server.py b/demos/demo_server.py index c4af9b10..4867e9ca 100644 --- a/demos/demo_server.py +++ b/demos/demo_server.py @@ -40,7 +40,7 @@ print('Read key: ' + u(hexlify(host_key.get_fingerprint()))) class Server (paramiko.ServerInterface): - # 'data' is the output of base64.encodestring(str(key)) + # 'data' is the output of base64.b64encode(key) # (using the "user_rsa_key" files) data = (b'AAAAB3NzaC1yc2EAAAABIwAAAIEAyO4it3fHlmGZWJaGrfeHOVY7RWO3P9M7hp' b'fAu7jJ2d7eothvfeuoRFtJwhUmZDluRdFyhFY/hFAh76PJKGAusIqIQKlkJxMC' -- cgit v1.2.3 From 367a51d77a1b7c2553c4055cb002f9d51aff0889 Mon Sep 17 00:00:00 2001 From: Alan Yee Date: Mon, 1 Aug 2016 11:37:58 -0700 Subject: Update README.rst Minor styling to highlight the key --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 54c2a02f..74757e8d 100644 --- a/README.rst +++ b/README.rst @@ -100,7 +100,7 @@ Probably the simplest demo is this:: client.close() This prints out the results of executing ``ls`` on a remote server. The host -key b'AAA...' should of course be replaced by the actual base64 encoding of the +key ``b'AAA...'`` should of course be replaced by the actual base64 encoding of the host key. If you skip host key verification, the connection is not secure! The following example scripts (in demos/) get progressively more detailed: -- cgit v1.2.3 From 486eca2fac7b622b013bd0b0144376606b9e409c Mon Sep 17 00:00:00 2001 From: Alan Yee Date: Mon, 1 Aug 2016 11:40:15 -0700 Subject: Update README.rst Revising wording --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 74757e8d..cf1258f3 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ under the GNU Lesser General Public License (`LGPL `_). The package and its API is fairly well documented in the ``docs`` folder that -should have come with this archive. +should have come with this repository. Installation @@ -134,7 +134,7 @@ Use --- The demo scripts are probably the best example of how to use this package. -There is also a lot of documentation, generated with Sphinx autodoc, in the +Also a lot of documentation is generated by Sphinx autodoc, in the doc/ folder. There are also unit tests here:: -- cgit v1.2.3 From 594ecebef6b3158421c86a7ee139eed1b58694ce Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 5 Dec 2016 20:06:37 -0800 Subject: Changelog re #792 --- sites/www/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 071bdd32..e44998c3 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +* :support:`792 (1.17+)` Minor updates to the README and demos; thanks to Alan + Yee. * :bug:`789` Add a missing ``.closed`` attribute (plus ``._closed`` because reasons) to `ProxyCommand ` so the earlier partial fix for :issue:`520` works in situations where one is gatewaying via -- cgit v1.2.3