Skip to content
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

Get assertion error when trying to Login With Public Key #322

Closed
wjflow opened this issue Jul 24, 2019 · 8 comments
Closed

Get assertion error when trying to Login With Public Key #322

wjflow opened this issue Jul 24, 2019 · 8 comments

Comments

@wjflow
Copy link

wjflow commented Jul 24, 2019

Hi All, having a bit of a hard time I want to ssh into a server and execute some commands with this:
Login With Public Key

Open Connection  xx.xxx.xx.xxx  port=22
Get Connection    
Login With Public Key     username   /Users/thatsme/.ssh/id_rsa  
Debug
${output}=  Execute Command  ls -al
log to console  ${\n}${output}
Close All Connections

But every time I run it it opens the connection but fails 20190724 15:00:40.573 : FAIL : AssertionError
stumped here big time I can got to my term and ssh username@XX.XX.XX.XX and it works fine any ideas?

@cristii006
Copy link
Contributor

Hello,

I tried to reproduce the problem you described, Linux to Linux and Windows to Linux works well, but I didn't manage to test Linux to Windows login . Could you tell me what you did to obtain this error and provide more details(OS used SSHLibrary version, SSH server that you used, etc.) that can help us reproduce the problem you described?

BR,
Cristi.

@wjflow
Copy link
Author

wjflow commented Jul 29, 2019 via email

@wjflow
Copy link
Author

wjflow commented Jul 29, 2019

Hi all I changed my code to include Enable Ssh Logging and got this

DEB [20190729-12:52:20.931] thr=2 paramiko.transport: Adding ssh-ed25519 host key for xx.xxx.xx.xxx: b'594982e93ccf7586d654dac5a11c5047'
DEB [20190729-12:52:20.985] thr=1 paramiko.transport: userauth is OK
DEB [20190729-12:52:20.993] thr=1 paramiko.transport: Authentication type (password) not permitted.
DEB [20190729-12:52:20.993] thr=1 paramiko.transport: Allowed methods: ['publickey', 'gssapi-keyex', 'gssapi-with-mic']

is it somehow passing a password? So basically it is looking to me that it makes the connection logs on and then bombs out before it executes the command

on my server side I see this:

Jul 29 12:33:16 2401 sshd[22605]: Accepted publickey for forest from xx.x.xx.xxx port 62577
Jul 29 12:39:06 2401 sshd[22670]: Connection closed by xx.xx.xx.xx port 62869 [preauth]
Jul 29 12:40:17 2401 sshd[22708]: Connection closed by xx.xx.xx.xx port 62917 [preauth]

@cristii006
Copy link
Contributor

Hello William,

I managed to reproduce the problem you described in your last comment but it doesn't come from SSHLibrary. I found this issue in Paramiko paramiko/paramiko#1135 but the problem seems to come from OpenSSH. This problem is expected to be fixed in the next months.

BR,
Cristi.

@mika-b
Copy link
Contributor

mika-b commented Oct 21, 2020

It seems the issue with newer key format was fixed with paramiko 2.7 released in December 2019. This issue can probably be closed.

http://www.paramiko.org/changelog.html#2.7.0

@cristii006
Copy link
Contributor

Using paramiko 2.7 this problem does not occur anymore. This issue can now be closed.

@santanukumarg09
Copy link

I am facing similar issue with
robotframework-sshlibrary version : 3.7.0
paramiko vesrion 2.7.2

but this issue is not there for
robotframework-sshlibrary version : 3.6.0

@mihaiparvu
Copy link
Contributor

@santanukumarg09 can you post the full error message and a simple example that I can reproduce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants