#!/usr/bin/perl use Net::Appliance::Session; my $s = Net::Appliance::Session->new({ personality => 'ios', transport => 'SSH', host => $HOST, privileged_paging => 1, # only if using ASA/PIX OS 7+ # and there are other behaviour options, see below }); try { $s->connect({ username => 'XXXXX', password => 'XXXXXXX' }); $s->begin_privileged; print $s->cmd('show ver'); $s->end_privileged; } catch { warn "failed to execute command: $_"; } finally { $s->close; };