02-07-2012 10:02 AM - edited 03-16-2019 09:27 AM
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
02-15-2012 12:26 PM
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
03-19-2012 05:46 AM
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 !
11-30-2012 06:14 AM
Thanks Benoit, worked like a champ!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide