use Net::SSH::Perl; $host="IP"; $username = "username"; $pass = "password"; my $ssh = Net::SSH::Perl->new("$host"); $ssh->login($username, $pass); my($stdout, $stderr, $exit) = $ssh->cmd(sh access-list access_inside_in); print "output: $stdout\n"; print "Error: $stderr\n"; print "status: $exit\n";