Skip to content

Commit c3206df

Browse files
author
Pan
committed
Updated read me.
1 parent e875912 commit c3206df

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ script:
2525
- export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
2626
- nosetests
2727
- flake8 ssh2
28+
# Test source distribution builds
2829
- python setup.py sdist
2930
- cd dist && pip install * && cd ..
3031
- cd doc; make html; cd ..

README.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ At this time all of the `libssh2`_ API has been implemented up to version ``1.8.
4545

4646
Complete example scripts for various operations can be found in the `examples directory`_.
4747

48-
In addition, as ``ssh2-python`` is a thin wrapper of ``libssh2`` with Python semantics, its code examples can be ported straight over to Python with only minimal changes.
48+
In addition, as ``ssh2-python`` is a thin wrapper of ``libssh2`` with Python semantics, `its code examples <https://libssh2.org/examples/>`_ can be ported straight over to Python with only minimal changes.
4949

5050

5151
Library Features
@@ -96,6 +96,8 @@ Connect and get available authentication methods.
9696
print(session.userauth_list())
9797
9898
99+
Output will vary depending on SSH server configuration. For example:
100+
99101
.. code-block:: python
100102
101103
['publickey', 'password', 'keyboard-interactive']
@@ -104,7 +106,6 @@ Connect and get available authentication methods.
104106
Agent Authentication
105107
------------------------
106108

107-
108109
.. code-block:: python
109110
110111
session.agent_auth(user)
@@ -113,7 +114,6 @@ Agent Authentication
113114
Command Execution
114115
------------------------
115116

116-
117117
.. code-block:: python
118118
119119
channel = session.open_session()
@@ -154,16 +154,15 @@ Public Key Authentication
154154
.. code-block:: python
155155
156156
session.userauth_publickey_fromfile(
157-
username, 'my_pkey.pub', 'my_pkey', '')
157+
username, 'private_key_file')
158158
159159
160-
Where ``''`` can be a passphrase.
160+
Passphrase can be provided with the ``passphrase`` keyword param - see `API documentation <https://ssh2-python.readthedocs.io/en/latest/session.html#ssh2.session.Session.userauth_publickey_fromfile>`_.
161161

162162

163163
Password Authentication
164164
----------------------------
165165

166-
167166
.. code-block:: python
168167
169168
session.userauth_password(

0 commit comments

Comments
 (0)