#!/usr/bin/perl -w use Net::SSH::Perl; use strict; my $ip = ""; my $pw = ""; my $user = 'configadm'; my $ssh = Net::SSH::Perl->new($ip, protocol=>2); my ($stdout, $stderr, $exit); eval { $ssh->login($user,$pw); ($stdout, $stderr, $exit) = $ssh->cmd('/bin/ls /'); }; if ($@) { die "@@@@@ failed login or command problem"; } print $stdout; exit 0;