in reply to Re: Perl with Net::SSH2, vshell and psexec
in thread Perl with Net::SSH2, vshell and psexec
Using Net::SSH2 correctly is quite hard and may involve digging into Net::SSH2 and libssh2 source code in order to discover how things really work and why your theoretical correct program doesn't.
I second this! I use the perl Expect module to control the shell ssh command.
I do a lot of cisco ios network automation using perl, and have published an open source suite of modules to handle connectivity, logging, testing, etc. They are posted at menzascripting.com. The Mnet::Expect module has my code for controlling ssh sessions (with authentication, prompt detection, telnet fallback, etc). Feel free to view or use that code. There a lot of quirk-mitigation built into it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Perl with Net::SSH2, vshell and psexec
by t_rex_joe (Sexton) on Feb 10, 2014 at 14:59 UTC |