#!/usr/bin/perl use Net::SSH::Perl; use strict; my ($auto_serv, $search_string, $insert_cmd ) = @_; my $cibs_host="www.myhost.com"; my $user = "userid"; my $cnt = 1; my $line; my $ssh = Net::SSH::Perl->new($cibs_host, options => [ "Protocol 2,1", "Debug 2", "identity_files id_dsa"]); $ssh->login($user); my (@out1, $err1, $exit2) = $ssh->cmd("df -k"); foreach $line(@out1) { print "$cnt: $line\n"; $cnt++; }