-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library raises Authentication failure, but host accepted it #374
Comments
I've tried to reproduce this but without success, for my environment it works without problem. Did you try to connect using the Robot Framework test data syntax: Open Connection ${host}
Login root Note there's no need to put |
Thank you for your answer. I tried using RobotFramework directly (instead of using my python library), and as you suggested, without giving the empty password. The issue is now clearer : With
everything is fine, whereas with
I get the error described previously.
When I got back to Conclusion : version 3.6.0 no longer supports explicit empty password. I do not know if this is considered as a real issue; but I can manage a workaround on my end, so thanks ! |
I also have this issue, and the workaround of "go back to robotframework-sshlibrary==3.5.1" is not really a sufficient fix. It seems there is an actual bug in robotframework-sshlibrary preventing password-less authentication from working. Having looked through the code for v3.8.0 I seem to have tracked it down to these lines in the
This code seems to be turning the value of If password is None, why would we want to attempt to encode the string 'None' into a byte array as the password? Shouldn't it be:
Can someone with more knowledge of this library confirm these findings? Making this change locally seems to allow me to log in without a password using |
Hello, My test.robot file as below: *** Variables *** *** Test Cases *** |
Hello,
I have experienced issues with the latest version 3.6.0 that I do not have with version 3.5.1
I manage to open a connection with "open_connection"
open_connection(ip, port=port, timeout=timeout, prompt="#")
but "login" systematically fails
self.login("root", "")
as follows
Traceback (most recent call last): File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/pythonclient.py", line 123, in _login transport.auth_none(username) File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/paramiko/transport.py", line 1446, in auth_none return self.auth_handler.wait_for_response(my_event) File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/paramiko/auth_handler.py", line 240, in wait_for_response raise AuthenticationException("Authentication timeout.") paramiko.ssh_exception.AuthenticationException: Authentication timeout.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/abstractclient.py", line 202, in login self._login(username, password, allow_agent, look_for_keys, proxy_cmd, read_config_host, jumphost_connection) File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/pythonclient.py", line 141, in _login raise SSHClientException SSHLibrary.abstractclient.SSHClientException
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/library.py", line 1053, in _login login_output = login_method(username, *args) File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/abstractclient.py", line 206, in login % self._decode(username)) SSHLibrary.abstractclient.SSHClientException: Authentication failed for user 'root'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "qemu_investigation.py", line 7, in <module> foo.connect_board() File "/media/workdir/iot-bridge-projectconf/verification/test_lib/fr_iotb_environment/Ssh.py", line 56, in connect_board raise e File "/media/workdir/iot-bridge-projectconf/verification/test_lib/fr_iotb_environment/Ssh.py", line 49, in connect_board self.login(self.sut.user, self.sut.password) File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/library.py", line 982, in login is_truthy(look_for_keys), delay, proxy_cmd, is_truthy(read_config_host), jumphost_connection) File "/home/galaxy/.pyenv/versions/py369-ssh/lib/python3.6/site-packages/SSHLibrary/library.py", line 1059, in _login raise RuntimeError(e) RuntimeError: Authentication failed for user 'root'.
On the host side, login is seen with a
journalctl -f
sshd[2307]: Accepted none for root from 192.168.1.26 port 52926 ssh2
As I mentionned, with version 3.5.1 eveything works fine (I switched version several times with
pip3 install robotframework-sshlibrary==3.5.1
/pip3 install robotframework-sshlibrary==3.6.0
)The host I am trying to connect to is an embedded system with linux, accessible with "root" and no password. I am not sure I can give you much details about the host, because this is work-related. Anyway, I figured this might reveal a problem in the 3.6.0 version of SSHLibrary.
Best regards
The text was updated successfully, but these errors were encountered: