cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2137
Views
11
Helpful
3
Replies

CM platform access with plink.exe

Roman Rodichev
Level 7
Level 7

Has anyone been successful at scripting ssh commands for CM platform access? I'm trying the plink:

plink -ssh -v -pw pass administrator@1.1.1.1 show status

but I get this:

C:\Documents and Settings\Administrator\Desktop\audio>convert

stty: standard input: Invalid argument

Command Line Interface is starting up, please wait ...

stty: standard input: Invalid argument

stty: standard input: Invalid argument

Exception in thread "main" java.lang.NumberFormatException: For input string: ""

        at java.lang.NumberFormatException.forInputString(NumberFormatException.

java:48)

        at java.lang.Integer.parseInt(Integer.java:470)

        at java.lang.Integer.parseInt(Integer.java:499)

        at sdMain.main(sdMain.java:610)

stty: standard input: Invalid argument

Copyright Cisco Systems 2006-2008

3 Replies 3

Aaron Harrison
VIP Alumni
VIP Alumni

Hi

I tried that a couple of years back, and failed.. it doesn't seem to like whatever Cisco have done when replacing the shell...

What info are you trying to retreive, and for what system? There may be another API or management option that could provide the info..

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

benoit.moinet
Level 1
Level 1

Hi,

Roman, have you resolved your problem with plink ?

I'm also trying to connect with it.

I had the same problem I resolved with the following tricks...

I'm able to connect with this command and execute show status for example :

plink.exe -ssh administrator@10.11.12.13 -pw "password" -batch < plink-command.txt

In "plink-command.txt" I have this :

" -> Begin of file

show status

" -> End of file

/ ! \ You have to do an empty line at the end of the file in order to work.

At the moment, I'm unable to send a second command...

If you have find another way, I would be happy to hear about it !

cbelcher
Level 1
Level 1

Thanks Benoit, worked like a champ!