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.
|
---|
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 |