http://www.perlmonks.org?node_id=1019298


in reply to Executing Linux command remotely from Windows client using SSH2

In order to run several commands over one plink connection you would have to run a shell on the remote side, sending commands and processing the output, looking for prompts in order to discover when some command is done, etc... a quite effective way to waste your time!

Net::SSH::Perl is and old and unmaintained module, with lots of bugs and almost impossible to install on Windows.

Net::SSH2 would make your life slightly better. It allows to run several commands over the same connection, but its API is too low level, making its operation unnecessarily difficult. You should be able to find versions of Net::SSH2 prepackaged for Windows.

Finally, I have been working for some time on Net::SSH::Any, a module that runs on top of Net::SSH2 or Net::OpenSSH providing a unified high level API. It is still a work in progress but simple operations as capturing the output of remote commands, already work flawlessly and it is far easier to use than the alternatives.

Replies are listed 'Best First'.
Re^2: Executing Linux command remotely from Windows client using SSH2
by perldev (Initiate) on Feb 18, 2013 at 09:00 UTC
    Thank you salva for your valuable comments and guidance. I will surely look out for the alternative as mentioned by you.