Skip to content

Commit 5f4a413

Browse files
author
Pan
committed
Added id_ecdsa to default identities list for native client. Updated changelog.
Disable python 3.7 win32 builds due to gevent build failure on that platform and architecture Updated travis cfg Updated documentation, readme Updated travis osx script.
1 parent e290bd7 commit 5f4a413

File tree

8 files changed

+70
-63
lines changed

8 files changed

+70
-63
lines changed

.appveyor.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ environment:
5858
MSVC: "Visual Studio 14 Win64"
5959
ARCH: x64_86
6060

61-
- PYTHON: "C:\\Python37"
62-
PYTHON_VERSION: "3.7"
63-
PYTHON_ARCH: "32"
64-
MSVC: "Visual Studio 14"
65-
ARCH: i386
61+
# No gevent 3.7 32-bit wheel available, source build fails.
62+
# - PYTHON: "C:\\Python37"
63+
# PYTHON_VERSION: "3.7"
64+
# PYTHON_ARCH: "32"
65+
# MSVC: "Visual Studio 14"
66+
# ARCH: i386
6667

6768
- PYTHON: "C:\\Python37-x64"
6869
PYTHON_VERSION: "3.7"

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ before_install:
2525
install:
2626
- pip install -r requirements_dev.txt
2727
script:
28-
- export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
2928
# For testing SSH agent related functionality
3029
- eval `ssh-agent -s`
31-
- nosetests --with-coverage --cover-package=pssh tests/test_native_tunnel.py
30+
- nosetests --with-coverage --cover-package=pssh --nologcapture tests/test_native_tunnel.py
3231
- nosetests --with-coverage --cover-package=pssh tests/test_native_*_client.py
3332
- nosetests --with-coverage --cover-package=pssh tests/test_paramiko*.py
3433
- flake8 pssh

Changelog.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ Change Log
77
Changes
88
--------
99

10-
* Removed libssh2 native library dependency in favour of bundled ssh2-python libssh2 library.
10+
* Removed libssh2 native library dependency in favour of bundled ``ssh2-python`` libssh2 library.
1111
* Changed native client forward agent default behaviour to off due to incompatibility with certain SSH server implementations.
12-
* Added keep-alive functionality to native client - defaults to ``60`` seconds. ``ParallelSSHClient.keepalive_seconds`` to configure interval, ``0`` to disable.
12+
* Added keep-alive functionality to native client - defaults to ``60`` seconds. ``ParallelSSHClient(<..>, keepalive_seconds=<interval>)`` to configure interval, Set to ``0`` to disable.
13+
* Added ``~/.ssh/id_ecdsa`` default identity location to native client.
1314

1415

1516
1.8.2

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ The default SSH client library in ``parallel-ssh`` ``1.x.x`` series.
233233

234234
Pure Python code, while having native extensions as dependencies, with poor performance and numerous bugs compared to both OpenSSH binaries and the ``libssh2`` based native clients in ``parallel-ssh`` ``1.2.x`` and above. Recent versions have regressed in performance and have `blocker issues <https://github.com/ParallelSSH/parallel-ssh/issues/83>`_.
235235

236-
It does not support non-blocking mode, so to make it non-blocking monkey patching must be used which affects all other uses of the Python standard library. However, some functionality like Kerberos (GSS-API) authentication is not provided by other libraries.
236+
It does not support non-blocking mode, so to make it non-blocking monkey patching must be used which affects all other uses of the Python standard library. However, some functionality like Kerberos (GSS-API) authentication is not currently provided by other libraries.
237237

238238
asyncssh
239239
________

ci/travis/pyenv-wheel.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ python -m pip install -U setuptools pip
2626
pip install -U delocate wheel
2727
pip install -r requirements.txt
2828
pip wheel --no-deps .
29-
cp /usr/local/lib/libssh2* .
3029
delocate-listdeps --all *.whl
3130
delocate-wheel -v *.whl
3231
delocate-listdeps --all *.whl
3332

3433
ls -l *.whl
35-
rm -f *.dylib
3634
pip install -v *.whl
3735
pwd; mkdir -p temp; cd temp; pwd
3836
python -c "import pssh.clients" && echo "Import successfull"

doc/installation.rst

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,20 @@ Pip Install
1717
1818
If ``pip`` is not available on your Python platform, `see this installation guide <http://docs.python-guide.org/en/latest/starting/installation/>`_.
1919

20-
Old Python Versions
21-
---------------------
22-
23-
``1.1.x`` and above releases are not guaranteed to be compatible with Python ``2.6``.
24-
25-
If you are running a deprecated Python version such as ``2.6`` you may need to install an older version of ``parallel-ssh`` that is compatible with that Python platform.
26-
27-
For example, to install the ``1.0.0`` version, run the following.
28-
29-
.. code-block:: shell
30-
31-
pip install parallel-ssh==1.0.0
32-
33-
``1.0.0`` is compatible with all Python versions over or equal to ``2.6``, including all of the ``3.x`` series.
34-
35-
Older versions such as `0.70.x` are compatible with Python ``2.5`` and ``2.x`` but not the ``3.x`` series.
36-
3720
Dependencies
3821
--------------
3922

40-
When installing from source, it is responsibility of user to satisfy dependencies. For pre-built binary wheel packages with dependencies included, see `Pip Install`_.
23+
When installing from source, dependencies must be satisfied by ``pip install -r requirements.txt``. For pre-built binary wheel packages with dependencies included, see `Pip Install`_.
4124

42-
============ ================
43-
Dependency Minimum Version
44-
============ ================
45-
``libssh2`` ``1.6``
46-
``gevent`` ``1.1``
47-
``paramiko`` ``1.15.3``
48-
============ ================
25+
From ``2.0.0`` onwards, paramiko will become an _optional_ extra, with ``libssh2``, and for a limited set of functionality, ``libssh`` native library based clients via ``ssh2-python`` and ``ssh-python`` bindings respectively replacing it.
26+
27+
=============== ================
28+
Dependency Minimum Version
29+
=============== ================
30+
``ssh2-python`` ``0.16.0``
31+
``gevent`` ``1.1``
32+
``paramiko`` ``1.15.3``
33+
=============== ================
4934

5035

5136
Building from Source
@@ -106,7 +91,7 @@ Debian based
10691

10792
.. code-block:: shell
10893
109-
docker build --cache-from parallelssh/ssh2-python:debian7 ci/docker/debian7 -t debian7
94+
docker build --cache-from parallelssh/parallel-ssh-pkgs:debian7 ci/docker/debian7 -t debian7
11095
docker run -v "$(pwd):/src/" debian7 --iteration debian7 -s python -t deb setup.py
11196
11297
@@ -115,5 +100,26 @@ RPM based
115100

116101
.. code-block:: shell
117102
118-
docker build --cache-from parallelssh/ssh2-python:centos7 ci/docker/centos7 -t centos7
103+
docker build --cache-from parallelssh/parallel-ssh-pkgs:centos7 ci/docker/centos7 -t centos7
119104
docker run -v "$(pwd):/src/" centos7 --rpm-dist el7 -s python -t rpm setup.py
105+
106+
107+
See `fpm <http://fpm.readthedocs.io/en/latest/>`_ for making system packages of various types.
108+
109+
110+
Deprecated Python Versions
111+
---------------------------
112+
113+
``1.1.x`` and above releases are not compatible with Python ``2.6``.
114+
115+
If you are running a deprecated Python version such as ``2.6`` you may need to install an older version of ``parallel-ssh`` that is compatible with that Python platform.
116+
117+
For example, to install the ``1.0.0`` version, run the following.
118+
119+
.. code-block:: shell
120+
121+
pip install parallel-ssh==1.0.0
122+
123+
``1.0.0`` is compatible with all Python versions over or equal to ``2.6``, including all of the ``3.x`` series.
124+
125+
Older versions such as `0.70.x` are compatible with Python ``2.5`` and ``2.x`` but not the ``3.x`` series.

doc/ssh2.rst

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,26 @@ For the ``ssh2-python`` (``libssh2``) based clients, not all features supported
55

66
Below is a comparison of feature support for the two client types.
77

8-
=============================== ============== ======================
9-
Feature paramiko ssh2-python (libssh2)
10-
=============================== ============== ======================
11-
Agent forwarding Yes Yes (binary wheels or from source builds only)
12-
Proxying/tunnelling Yes Yes
13-
Kerberos (GSS) authentication Yes Not supported
14-
Private key file authentication Yes Yes
15-
Private key from memory Yes Not yet implemented
16-
Agent authentication Yes Yes
17-
Password authentication Yes Yes
18-
SFTP copy to/from hosts Yes Yes
19-
Session timeout setting Yes Yes
20-
Per-channel timeout setting Yes Yes
21-
Programmatic SSH agent Yes Not supported
22-
OpenSSH config parsing Yes Not yet implemented
23-
ECSA keys support Yes Yes
24-
SCP functionality Not supported Yes
25-
=============================== ============== ======================
8+
=============================== ============== ====================== ===============================================================================
9+
Feature paramiko ssh2-python (libssh2) Notes
10+
=============================== ============== ====================== ===============================================================================
11+
Agent forwarding Yes Yes From source builds only - cython and embedded ssh2 required
12+
Proxying/tunnelling Yes Yes Current implementation has low performance - establishes connections serially
13+
Kerberos (GSS) authentication Yes Not supported
14+
Private key file authentication Yes Yes ECDSA supported, ED25519 pending upstream update
15+
Private key from memory Yes Not yet implemented
16+
Agent authentication Yes Yes
17+
Password authentication Yes Yes
18+
SFTP copy to/from hosts Yes Yes
19+
Session timeout setting Yes Yes
20+
Per-channel timeout setting Yes Yes
21+
Programmatic SSH agent Yes Not supported
22+
OpenSSH config parsing Yes Not yet implemented
23+
ECSA keys support Yes Yes
24+
SCP functionality Not supported Yes
25+
Keep-alive functionality Unknown Yes As of ``1.9.0``
26+
=============================== =============== ====================== ==============================================================================
2627

27-
If any of missing features are required for a use case, then the paramiko based clients should be used instead.
28+
If any of missing features are required for a use case, then the paramiko based clients should be used instead. Note there are several breaking bugs and low performance in some paramiko functionality, mileage may vary.
2829

2930
In all other cases the ``ssh2-python`` based clients offer significantly greater performance at less overhead and are preferred.

pssh/clients/native/single.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@
5454
class SSHClient(object):
5555
"""ssh2-python (libssh2) based non-blocking SSH client."""
5656

57-
IDENTITIES = [
57+
IDENTITIES = (
5858
os.path.expanduser('~/.ssh/id_rsa'),
5959
os.path.expanduser('~/.ssh/id_dsa'),
60-
os.path.expanduser('~/.ssh/identity')
61-
]
60+
os.path.expanduser('~/.ssh/identity'),
61+
os.path.expanduser('~/.ssh/id_ecdsa'),
62+
)
6263

6364
def __init__(self, host,
6465
user=None, password=None, port=None,
@@ -122,11 +123,11 @@ def __init__(self, host,
122123
self.forward_ssh_agent = forward_ssh_agent
123124
self._forward_requested = False
124125
self.session = None
126+
self.keepalive_seconds = keepalive_seconds
127+
self._keepalive_greenlet = None
125128
self._host = proxy_host if proxy_host else host
126129
self.pkey = _validate_pkey_path(pkey, self.host)
127130
self._connect(self._host, self.port)
128-
self.keepalive_seconds = keepalive_seconds
129-
self._keepalive_greenlet = None
130131
if _auth_thread_pool:
131132
THREAD_POOL.apply(self._init)
132133
else:

0 commit comments

Comments
 (0)