in reply to Re: Unable to run command on Cisco switch
in thread Unable to run command on Cisco switch

Many thanks for the prompt responses.
I have been down the road of trying to use Net::SSH::Expect but as you've rightly said, it would not work on a windows machine.
The other modules I looked at require some sort of pty, which windows does not support. Net::SSH2 does not work due to the requirement to have libssh2 on the machine.
I will try using cygwin again. Had problems with the installation. Will report back if i could get cygwin working. Otherwise the quest continues
  • Comment on Re^2: Unable to run command on Cisco switch

Replies are listed 'Best First'.
Re^3: Unable to run command on Cisco switch
by salva (Canon) on Sep 01, 2009 at 10:28 UTC
    Another option would be to use plink (the command line ssh client that comes with PuTTY). AFAIK, it doesn't try to emulate TTYs in Windows so it would be easier to automate than OpenSSH ssh client.
      Thanks for that. I used plink.
      The -m option did not work, so I redirected STDIN and it all works fine.
      The gotcha I discovered was that cisco switch was being parsed \r\n as newline. So that made going into enable mode a bit tricky. But that all sorted now by sending my command and a \r.
      Thanks.