Header Only - DO NOT REMOVE - Extreme Networks

Connection problems with plink (putty for commandline) to EOS devices


Userlevel 5
Hello all,
I want to connect to EOS devices with plink (the command line version of putty).
I need plink because I will use the communicaton in scripts on my PC.

With XOS all works fine. For example I use this command:

"plink ip –l user –pw passwort show switch" => I receive the expected result

On EOS I use:

"plink ip –l user –pw passwort show system" => I receive Error: „FATAL ERROR: Server sent disconnect message.

Same behaviour if I use a config-file with the CLI-commands (like show system) instead of the CLI-command in the plink command line.

If I use the command:

"plink ip –l user –pw passwort" (without a CLI command) I receive no error but an oben CLI-session and can manualy set command on the open CLI-session.

Now the quesion. Does anybody know how I can connect to EOS via plink?

Best regards
Stephan

9 replies

Userlevel 4
I have not used PLINK so I have no specific advice there. Hopefully somebody in the community has.
That said it may be helpful to turn up logging on the EOS device and see if you get an error that may steer you in the right direction.
Userlevel 3
Hello,

I did some quick testing with this and was able to replicate the behaviors you describe. My suspicion is because EOS is not a linux based operating system the method plink is using to send the commands in may not be supported. If you have a need for plink to work I would suggest logging a case with the GTAC for further investigation into this.

-Alex
Userlevel 5
Hello Daniel, hello Alex,

thank you for your fast respone.
I will create a GTAC case.

Stephan
Userlevel 7
Hi,

I have tested this connecting to a D2 as EOS device with openssh on GNU/Linux, seeing the following results:
  1. Interactive login works fine,
  2. Specifying a command with the SSH invocation does not work,
  3. Providing a command to SSH via STDIN does work.
This seems to be similar to the problem reported by SH.

The test switch does not have a password configured, its IP address is 10.0.0.11.

Output for case 2:
$ ssh admin@10.0.0.11 "show version" Received disconnect from 10.0.0.11: 2: Packet integrity error. [/code]$ ssh admin@10.0.0.11 show version Received disconnect from 10.0.0.11: 2: Packet integrity error.[/code]Output for case 3:
$ echo show version | ssh admin@10.0.0.11 Pseudo-terminal will not be allocated because stdin is not a terminal. Enterasys D2-Series Command Line Interface Enterasys Networks, Inc. 50 Minuteman Rd. Andover, MA 01810-1008 U.S.A. Phone: +1 978 684 1000 E-mail: support@enterasys.com WWW: http://www.enterasys.com (c) Copyright Enterasys Networks, Inc. 2009 Chassis Serial Number: 08351019905C Chassis Firmware Revision: 06.03.01.0008 D2(su)->show version Model Serial # Versions -------------- ----------------- ------------------- D2G124-12 08351019905C Hw:BCM5698 REV 17 Bp:01.00.44 Fw:06.03.01.0008 BuFw:01.00.03.0002 D2(su)->Connection to 10.0.0.11 closed by remote host.
[/code]
Userlevel 5
Hello,

I opend a GTAC case for this. The answer to the case was that plink isn't supported.

Stephan
Userlevel 7
Hi Stephan,

you can use the following workaround:
echo show system | plink.exe IP -l USER -pw PASSWORD [/code](even on Windows)

Erik
Userlevel 5
Hello Erik,

thank you for the very good hint.
It works quite nice with a b-series switch and version 6.61.08.0013

but not with a s-series switch and version 8.42.02.0012

On the s-series the output looks like:

----------------------------------------
echo show system | plink.exe IP -l USER -pw PASSWORD

B O N D E D S 4 C H A S S I S Command Line Interface



Extreme Networks, Inc.

145 Rio Robles

San Jose, CA 95134

Phone: +1 408 579-2800

E-mail: support@extremenetworks.com

WWW: http://www.extremenetworks.com



(c) Copyright Extreme Networks, Inc. 2016



Chassis Serial Number: 141xxxx

Chassis Firmware Revision: 08.42.02.0012

-----------------------
Nothing more!!!

Maybe you have one more good idea?

Stephan
Userlevel 7
Hi Stephan,

I do not have a simple workaround for the S-Series. 😞

The following Expect script works for me on Ubuntu GNU/Linux with an SSA set up with IP address 10.0.0.101 and user account admin:password:
#! /usr/bin/expect spawn ssh admin@10.0.0.101 expect { {word:?} {send "password\r"} } expect { {)->} {send "show system\r"} } expect { {)->} {send "exit\r"} } exit
[/code]I have never tried Expect on Windows.

The above script is just a proof-of-concept, it is not robust or production ready.

Best regards,
Erik
Userlevel 5
Hello Erik,

your workaround works ( in Windows, too).

Thank you for help.

Best regards
Stephan

Reply