cancel
Showing results for 
Search instead for 
Did you mean: 

Python eaps_checker script: problems connecting via Paramiko SSH

Python eaps_checker script: problems connecting via Paramiko SSH

Patrick_Hanft
New Contributor
Hi@all, my first post here!

I'm trying to use python to gather different information from different switches, which is why I started with the eaps_checker script posted on github, to connect to switches and execute commands there. I also did tests, using exactly this script. It allows to connect either via telnet or via SSH using paramiko library.

While connecting with telnet worked for both, the original eaps_checker and my own script, as long as we had telnet enabled, I now need to use SSH for connecting, as telnet was disabled for security reasons.

Unfortunately connecting via SSH does neither work with the original eaps_checker nor with my own script (which does basically exactly the same). Trying to use OpenSSH manually I get errors like

no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
which is not nice, but as I think now, not really the root cause.

The error for eaps_checker.py and my script looks like this:

python2 ~/workspace/github/ExtremeScripting/EXOS/Python/eaps_checker/check_eaps.py -f Alle_IPs.txt -u admin -p XXXXX --ssh [Eaps checker version 1.01] [+] Checking switch: 10.4.0.10 Traceback (most recent call last): File "/home/patrick/workspace/github/ExtremeScripting/EXOS/Python/eaps_checker/check_eaps.py", line 365, in main() File "/home/patrick/workspace/github/ExtremeScripting/EXOS/Python/eaps_checker/check_eaps.py", line 331, in main MySess = SSH2EXOS(switch,args.user,args.password) File "/home/patrick/workspace/github/ExtremeScripting/EXOS/Python/eaps_checker/check_eaps.py", line 80, in __init__ self.client.connect(switch,username=user,password=password) File "/usr/lib/python2.7/site-packages/paramiko/client.py", line 380, in connect look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host) File "/usr/lib/python2.7/site-packages/paramiko/client.py", line 597, in _auth raise saved_exception paramiko.ssh_exception.AuthenticationException: Authentication failed.
Unfortunately I'm not really a huge python expert, so my skills in debugging the problem myself might not be the best. So my hope is, somebody here also ran into this or a similar problem, while trying to use paramiko library for connecting with SSH to an XOS switch.

Used ExtremeXOS version is 15.6.4.2 v1564b2-patch1-3
12 REPLIES 12

Even better! Thanks Stephane.

hey! this one, I did it. Took me a while to figure it out 🙂

Great to see you get a resolution Patrick and thanks for joining the Hub Community.

Our Community Manager, Drew Claybrook, does a great job marking the various threads solved or answered.

By simply coming back to the thread to confirm you're good to go helps Drew a great deal.

We very much appreciate your trust in Extreme Networks. Thanks again!

Stephane_Grosj1
Extreme Employee
If you can verify that it works with 21.1 (with look_for_key=False), 16.2 should also have the ssh server upgrade.

Patrick_Hanft
New Contributor
Thanks for googleing, somehow I missed that, although I had been on this page.

Using
look_for_keys=False
really got me further! But still I had issues with authentication, which seems to be related to keyboard-interactive mode but I did not figure out, what might be the exact issue here.

What did solve the problem for me for now, was to downgrade from paramiko version 2.0 to 1.16, which now works fine! I will have a closer look and try to file a paramiko bug. So maybe this is of some use for someone else.

Thanks again!
Patrick
GTM-P2G8KFN