On Tue, 10 Dec 2002 18:37:50 -0500, [EMAIL PROTECTED] (Chad
Kellerman) wrote:
>Mark,
>This is a pain to install. I would do it thru CPAN.
>perl -MCPAN -e shell
>cpan>install Net::SSH::Perl
> I fyou don't have root access to install perl modules, try to use
>Net::SSH.
>
>use strict;
>use warni
OTECTED]
>
>
>
> -Original Message-
> From: zentara [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 7:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Using ssh for uptime?
>
>
> On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathan
[mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 7:58 AM
To: [EMAIL PROTECTED]
Subject: Re: Using ssh for uptime?
On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathaniel
Weisman) wrote:
>Mark,
> I've got the code you sent installed and working (or almost work
On Sun, 8 Dec 2002 23:14:36 -0900, [EMAIL PROTECTED] (Mark-Nathaniel
Weisman) wrote:
>Mark,
> I've got the code you sent installed and working (or almost working
>anyway) snippet below:
>I'm trying to get this silly thing working, so any ideas or suggestions
>are more than appreciated.
Hi,
I use
Well whats not working ??
Mark
- Original Message -
From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]>
To: "Mark Goland" <[EMAIL PROTECTED]>
Cc: "perl" <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 3:14 AM
Subject: RE: Using ssh for
el Weisman
Cc: perl
Subject: Re: Using ssh for uptime?
system returns shell exit status
- Original Message -
From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]>
To: "perl" <[EMAIL PROTECTED]>
Sent: Sunday, December 08, 2002 3:23 AM
Subject: RE: Using ssh f
system returns shell exit status
- Original Message -
From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]>
To: "perl" <[EMAIL PROTECTED]>
Sent: Sunday, December 08, 2002 3:23 AM
Subject: RE: Using ssh for uptime?
> This is the line that allowed me
2002 1:21 PM
To: Mark Weisman
Cc: perl
Subject: Re: Using ssh for uptime?
why are you printing the comman to a file... this is how I would rewrite
the part that does the command. If you dont want to write it as a shell
command use Socket, or use IO::Socket.
use FileHandle;
use IPC::Open2;
My (
HAHAHAHaHa always happens!
-Chris
On Saturday 07 December 2002 11:23 am, chad kellerman wrote:
> Dammit, got the split wrong.
>
> try this:
> my ( $time, $uptime ) = ( split / /, $out[0] )[0,1];
>
> my bad..
>
>
>
> chad
>
> On Sat, 2002-12-07 at 12:11, Mark Weisman wrote:
> > I've
why are you printing the comman to a file... this is how I would rewrite the
part that does the command. If you dont want to write it as a shell command
use Socket, or use IO::Socket.
use FileHandle;
use IPC::Open2;
My (@machines,$host,$user,$pass)
# read your record
Open(INFILE," );
Close(INFILE
Dammit, got the split wrong.
try this:
my ( $time, $uptime ) = ( split / /, $out[0] )[0,1];
my bad..
chad
On Sat, 2002-12-07 at 12:11, Mark Weisman wrote:
> I've got a script that I'm working on that will use SSH to check the
> uptime on servers within my domain. However, I'm unsure of how
Mark,
It may be easier to go by route of the Net::SSH::Perl module or
Net::SSH module
#!/usr/bin/perl
use strict;
use warnings;
my $user = "bob";
my @hosts = "host1, host2, host3, host3";
foreach my $host (@hosts) :
my $cmd = "/usr/bin/uptime";
my $ssh = Net::SSH::Perl->new( $host, po
I've got a script that I'm working on that will use SSH to check the
uptime on servers within my domain. However, I'm unsure of how exactly
to do this this is what I have so far.
##!/usr/bin/perl
#My (@machines,$host,$user,$pass)
#Open(INFILE,";
#Close(INFILE);
#Foreach my $rec (@machines) {
#
13 matches
Mail list logo