Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Communication between Windows and Linux via Perl

by ambrus (Abbot)
on Apr 11, 2013 at 21:13 UTC ( #1028234=note: print w/ replies, xml ) Need Help??


in reply to Communication between Windows and Linux via Perl

Install putty to your machine. This comes with plink, a command-line ssh client that doesn't use a terminal emulator window on the client side. Import your keyfile to the PuttyGen program and save it in putty's private key file format. Spawn plink from your perl script with something like

$error = system q(plink -i yourkeyfile.ppk root@192.168.32.138 "ls /ho +me" > outputfile.txt);

Then, if $error is false, read the output file.


Comment on Re: Communication between Windows and Linux via Perl
Download Code
Re^2: Communication between Windows and Linux via Perl
by zhonghua (Novice) on Apr 18, 2013 at 08:36 UTC

    Hi

    Good idea. Very thanks. I'll try it.

    Up to now, the problem is still existing, but I'm too busy to finish this script. Some days later, I'll change a new environment and try again. Then I'll post the new progress.

    Thanks and Best Regards, Wei

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2014-11-28 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (198 votes), past polls