[Thamesvalley-pm] using ssh within perl scripts

Greg Matthews gmatt at nerc.ac.uk
Wed Oct 31 05:11:16 PDT 2007

Adam Trickett wrote:
> On Tuesday 30 Oct 2007, Greg Matthews wrote:
>> Seems like I'm the only one to ask for advice here...
>> I'm using ssh to connect to a series of machines like so:
>> open( SSH, "$ssh_bin $ssh_opts $host $command |") or die...
>> while (<SSH>) {
>> 	....
>> }
>> close SSH;
> Did you consider the Net::SSH::Perl or Net::SSH module, or do you really need 
> to do it this way?

yes, I looked at these initially, my main concern is that I can't 
guarantee that these modules will be available. IIRC at least one of 
these will do what I want.

For now I think I'll live with the ssh timeouts - this is run from cron 
so its not /my/ time!

thanks all


Greg Matthews           01491 692445
Head of UNIX/Linux, iTSS Wallingford

This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.

More information about the Thamesvalley-pm mailing list