#!/usr/local/bin/perl use strict; use warnings; use Net::OpenSSH; my $ssh = Net::OpenSSH->new( "auto_config\@management", passwd => "mypasswd", ssh_cmd => '/usr/local/bin/ssh' ); $ssh->error and die "Unable to open ssh connection: " . $ssh->error; print "Sending a command\n"; my $test = $ssh->capture( "show vlan" ); $ssh->error and warn "Operation did not work: " . $ssh->error; print "Output is: \n"; print $test;