Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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@ "ls /ho +me" > outputfile.txt);

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

Replies are listed 'Best First'.
Re^2: Communication between Windows and Linux via Perl
by zhonghua (Novice) on Apr 18, 2013 at 08:36 UTC


    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028234]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-01-21 07:46 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.