summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2016-12-05 20:06:58 -0800
committerJeff Forcier <jeff@bitprophet.org>2016-12-05 20:06:58 -0800
commitc13f7b3c59da66856ffffad7e2af0a3ff91222f1 (patch)
treee662f8f3b210bb65ce3c878cce469d4e16f99b9a
parent5cad7e4df9bf53528c28c86d6dd945133ee2028e (diff)
parent1d3ce6de95ac602a1a27d9a09b5de557bee07abf (diff)
downloadparamiko-c13f7b3c59da66856ffffad7e2af0a3ff91222f1.tar.gz
Merge branch '1.18' into 2.0
-rw-r--r--README.rst15
-rw-r--r--demos/demo_server.py2
-rw-r--r--sites/www/changelog.rst2
3 files changed, 11 insertions, 8 deletions
diff --git a/README.rst b/README.rst
index db342e22..01e00bf3 100644
--- a/README.rst
+++ b/README.rst
@@ -36,7 +36,7 @@ under the GNU Lesser General Public License (`LGPL
<https://www.gnu.org/copyleft/lesser.html>`_).
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
@@ -79,20 +79,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:
@@ -126,7 +127,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::
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'
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 260c6856..51238f32 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.
* :feature:`780 (1.18+)` (also :issue:`779`, and may help users affected by
:issue:`520`) Add an optional ``timeout`` parameter to
`Transport.start_client <paramiko.transport.Transport.start_client>` (and