Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Executing Linux command remotely from Windows client using SSH2

by salva (Abbot)
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

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019298]
help
Chatterbox?
[Corion]: Oh yay. The (external, not guided by me) programmers have chosen Moose+DBIx::Class for some implementation, and now seem to do 1+n SELECT statements for each row, as is usual when using ORMs.
[Corion]: So maybe I should investigate how to plug in a cache in front of DBIx::Class so I can do a ->selectall_hashre f and then satisfy the "sub"-selects from that cached single SELECT statement ...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-09-25 10:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (279 votes). Check out past polls.

    Notices?