Closed JBonser closed 6 years ago
Hi there,
Thanks for the interest and detailed report.
There have been other reports on the mailing list of password auth not working on Python 3.7 and I am inclined to believe this is an issue with Python 3.7 specifically.
Login on non-default port does work for the native client - all integration tests use non-default port - and password auth is also integration tested but currently tests are not run on Python 3.7 due to lack of Travis-CI target for it. So there may be issues there that have not been identified. The exceptions and logs also show the client connecting to correct port. - ('Authentication error while connecting to %s:%s - %s', '0.0.0.0', 26
Would it be possible to test with any version of Python other than 3.7 to confirm? That would help narrow the issue down.
Cannot replicate.
ParallelSSHClient(hosts, user="root"
<..>
Check the SSH server config and logs. Root logins normally do not allow password authentication.
Can re-open if it can be shown that the following /etc/ssh/sshd_config
config entry exists:
PermitRootLogin yes
As opposed to:
PermitRootLogin prohibit-password
Which is the default when root logins are enabled.
Hi,
This issue is same as #155 .
sshd_config
on the host I was accessing and the value PermitRootLogin
is as:PermitRootLogin yes
Edit 1:
Python 3.6.7
.Edit 2:
So, I would like this issue to be reopened. Also, since #155 is same, so that may be closed.
I'm getting the same error as well with Python 3.6.0.
sshd_config has PermitRootLogin=yes. Regardless, I'm neither using root nor using a different port. The Python was compiled from source.
It's a Rasperry Pi with Stretch so it's Raspbian 9 which is Debian based. ssh keys are configured for password-less login with the username ( pi@localhost ) being used with parallessh.
The simple example on the parallelssh front page (https://github.com/ParallelSSH/parallel-ssh) fails with this error:
raise AuthenticationException("No authentication methods succeeded") pssh.exceptions.AuthenticationException: No authentication methods succeeded
from example, the only change was:
hosts = ['localhost', 'localhost']
ssh version: OpenSSH_7.4p1 Raspbian-10+deb9u6, OpenSSL 1.0.2r 26 Feb 2019 sshd version: OpenSSH_7.4p1 Raspbian-10+deb9u6, OpenSSL 1.0.2r 26 Feb 2019
auth log indicates:
May 3 00:11:14 iceCold sshd[1686]: Received disconnect from 127.0.0.1 port 60068:11: end [preauth]
May 3 00:11:14 iceCold sshd[1686]: Disconnected from 127.0.0.1 port 60068 [preauth]
May 3 00:11:20 iceCold sshd[1689]: Received disconnect from 127.0.0.1 port 60082:11: end [preauth]
May 3 00:11:20 iceCold sshd[1689]: Disconnected from 127.0.0.1 port 60082 [preauth]
May 3 00:11:25 iceCold sshd[1695]: Connection closed by 127.0.0.1 port 60092 [preauth]
No workeeee.
Any solutions??? What else would help???
Same problem here after upgrade to python3.8 in my Debian servers, it worked with 3.7 and gevent 1.4:
Package Version
------------------------ ------------
gevent 20.6.2
greenlet 0.4.16
parallel-ssh 1.9.1
paramiko 2.6.0
python 3.8.4
ssh2-python 0.18.0.post1
With native client from pssh.clients import ParallelSSHClient
:
pssh.exceptions.AuthenticationException: ('Authentication error while connecting to %s:%s - %s', '10.9.0.1', 22, AuthenticationException('No authentication methods succeeded'))
With miko client from pssh.clients.miko import ParallelSSHClient
:
2020-07-23 09:14:30.491 : INFO : paramiko.transport : Connected (version 2.0, client OpenSSH_8.3p1)
2020-07-23 09:14:30.492 : INFO : paramiko.transport : Connected (version 2.0, client OpenSSH_8.3p1)
(...)
2020-07-23 09:14:30.613 : INFO : paramiko.transport : Authentication (publickey) successful!
2020-07-23 09:14:30.672 : INFO : paramiko.transport : Authentication (publickey) successful!
(...)
Thanks a lot in advance for your time ;)
Example Code to Reproduce
It appears that this code works perfectly (using the Paramiko SSH Client)
If I change this code to use the Native version i.e.
Then the code no longer works and the output I get is this(Real IP's have been changed to "0.0.0.0"):
Stacktrace
Behaviour
Expected
I expected the Native Client to Connect using the correct password on the port I specified.
Actual
An Authentication Exception was thrown. If I use a user that uses port 22 and the correct password the Native Client does work as expected. If I use the Paramiko Client and the port 26 user with the correct password it also works as expected. So it seems that this is specifically an issue with the Native Client but only when specifying a non default port.
Additional info
Python 3.7 pip freeze shows: asn1crypto==0.24.0 bcrypt==3.1.4 cffi==1.11.5 cryptography==2.3.1 gevent==1.3.6 greenlet==0.4.15 idna==2.7 parallel-ssh==1.8.1 paramiko==2.4.2 pyasn1==0.4.4 pycparser==2.19 PyNaCl==1.2.1 six==1.11.0 ssh2-python==0.15.0.post9