Quote:
Originally Posted by psychobyte
Hi,
I have some network switches that I can login to via ssh and run commandline arguments (not a bash environment). Is there an way/app out there that would allow me to pass commandline arguments to the switch then wait and get the command output. ALl this over ssh?
Any suggestions would be appreciated.
Thanks.
|
Sure, you could use expect to do that, especially if you've got SSH going already. If you can type in a command, expect can automate it.
There's tons of info on Google related to it, but a couple I thought were useful are:
http://www.linuxjournal.com/article/3065
http://www.osix.net/modules/article/?id=30
The "autoexpect" feature is nice, if you work with it. It'll watch a session as you type, and write the expect script for you.
