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 warnings;
>use Net::SSH qw( sshopen3 );
>
>my $user = "bob";
>my $host = "10.10.10.10";
>my $cmd = "uptime";
>sshopen3( "$user\@$host", *WRITER, *READER, *ERROR, "$cmd" );
>my $uptime = <READER>;
>chomp $uptime;
>print "$uptime\n";
>
>
>something like that ought to so it...

Also if you do use Net::SSH, you need to use key authorization, instead
of a password.
This is how you do that:

->challenge-response authentication.<-

1. Generate your ssh-keys with <ssh-keygen -d> for ssh2.

2. You will have the files $HOME/.ssh/id_dsa.pub and $HOME/.ssh/id_dsa.

3. The id_dsa.pub - file is your public key. Copy that file to the
     target to  $HOME/.ssh/machinename.pub and do a 
      "cd .ssh; cat machinename.pub >>authorized_keys". 

Now you should be able to connect to the target
machine via ssh without using passwords.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to