use Net::SSH::Perl; $user1 = "xxxx"; $host = "aa.bbb.ccc.dd"; my @files = ("$ENV{HOME}/.ssh/tsg"); my $ssh = Net::SSH::Perl->new($host, protocol => 2, cipher => "3des-cbc", port => 22, identity_files => \@files); $ssh->login($user1); my ($err, $out) = $ssh->cmd("ifconfig"); my @array_daten = split(/\n/,$out); foreach (@array_daten) {print "$_\n"}; my ($out) = $ssh->cmd("who"); my @array_daten = split(/\n/,$out); foreach (@array_daten) {print "$_\n"};