I use Net::SSH::Perl
http://search.cpan.org/dist/Net-SSH-Perl/lib/Net/SSH/Perl.pm to do
that.
On Mon, Nov 24, 2008 at 7:58 PM, monnappa appaiah <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm running kubuntu linux............I used Net::SSH2 to login to
> remote machine, execute commands and give me the ouput.......when i run the
> below code i get this error
> "Segmentation fault"...........does anybody have an idea wat this error is?
>
> ---------------------------------------------------------------------------------
> #!/usr/bin/perl -w
> use strict;
> use Net::SSH2;
>
> my $ssh2 = Net::SSH2->new();
> $ssh2->connect('10.10.10.5') or die "unable to connect to host [EMAIL
> PROTECTED]";
> $ssh2->auth_password('xxz', 'xyzpass');
> my $chan = $ssh2->channel();
> $chan->exec('ls -la');
> while (<$chan>) { print}
>
> ----------------------------------------------------------------------------------
>
>
> Thanks,
> Monnappa
>
--
David Schmidt | http://www.fm5.at
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/