Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2016-10-22 03:36 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (292 votes). Check out past polls.