Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 106 by [email protected]: disable ssh-agent in Login keyword
http://code.google.com/p/robotframework-sshlibrary/issues/detail?id=106

Please explain the bug you have encountered and most importantly, how to
reproduce it.

Have a linux desktop with ssh-agent (for example Ubuntu 12.04) and use keyword Login - which aims to ssh with password only,
but in logs I see :

robot logs:
KEYWORD: SSHLibrary.Login someuser, ${SSH_someuser_pass}
Documentation:  

Logs into the SSH server with the given `username` and `password`.
Start / End / Elapsed: 20140403 10:56:04.533 / 20140403 10:56:04.804 / 00:00:00.271
10:56:04.534    TRACE   Arguments: [ u'someuser' | u'someuser' ]
10:56:04.534    INFO    Logging into 'some.host:22' as 'someuser'.
10:56:04.613 DEBUG Adding ssh-rsa host key for some.host: deadbeefdeadbeefdeadbeefdeadbeef
10:56:04.618    DEBUG   Trying SSH agent key deadbeefdeadbeefdeadbeefdeadbeee
10:56:04.683    DEBUG   Trying SSH agent key deadbeefdeadbeefdeadbeefdeadbeed
10:56:04.699    DEBUG   Trying SSH agent key deadbeefdeadbeefdeadbeefdeadbeec
10:56:04.800    DEBUG   Trying SSH agent key deadbeefdeadbeefdeadbeefdeadbeea
10:56:04.804    FAIL    SSHException: No existing session
10:56:04.804 DEBUG Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/robotframework_sshlibrary-2.0.2-py2.7.egg/SSHLibrary/library.py", line 788, in login return self._login(self.current.login, username, password, delay) File "/usr/local/lib/python2.7/dist-packages/robotframework_sshlibrary-2.0.2-py2.7.egg/SSHLibrary/library.py", line 828, in _login login_output = login_method(username, *args) File "/usr/local/lib/python2.7/dist-packages/robotframework_sshlibrary-2.0.2-py2.7.egg/SSHLibrary/abstractclient.py", line 139, in login self._login(username, password) File "/usr/local/lib/python2.7/dist-packages/robotframework_sshlibrary-2.0.2-py2.7.egg/SSHLibrary/pythonclient.py", line 66, in _login password, look_for_keys=False) File "/usr/local/lib/python2.7/dist-packages/paramiko-1.13.0-py2.7.egg/paramiko/client.py", line 273, in connect self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys) File "/usr/local/lib/python2.7/dist-packages/paramiko-1.13.0-py2.7.egg/paramiko/client.py", line 456, in _auth raise saved_exception
10:56:04.527    TRACE   Arguments: [ ]
end robot logs

Please also include the following information:
- SSHLibrary version: 2.0.2
- Used interpreter (Python/Jython) and its version: python2.7
- Operating system: Ubuntu 12.04

Please update pythonclient.py to not use ssh-agent when login w/o keys:

root@boot:/usr/local/lib/python2.7/dist-packages/robotframework_sshlibrary-2.0.2-py2.7.egg/SSHLibrary# diff pythonclient.py pythonclient.py.orig
66c66
< password, look_for_keys=False, allow_agent=False)
---
                                 password, look_for_keys=False)
root@boot:/usr/local/lib/python2.7/dist-packages/robotframework_sshlibrary-2.0.2-py2.7.egg/SSHLibrary#

may apply to previous releases as well.

I have not tested login with explicit key if there was interaction with ssh-agent also.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to