Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Executing Linux command remotely from Windows client using SSH2

by salva (Monsignor)
on Feb 18, 2013 at 08:46 UTC ( #1019298=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Executing Linux command remotely from Windows client using SSH2
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019298]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-08-20 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (124 votes), past polls