#!/usr/bin/perl use Net::SSH::Perl; use POSIX qw(strftime); $time = strftime "%d-%b-%Y", localtime; $host = "XXX.XXX.XXX.XXX"; $username = "user"; $password = "password"; $port = "XXXX"; $ssh = Net::SSH::Perl->new($host,port=>"$port",protocol=>2); @array = $ssh->login($username,$password); #@ary = $ssh ->cmd("show arp"); @data = $ssh->cmd("show interfaces"); print "@array\n@data\n"; @data2 = $ssh ->cmd("exit"); print "@data2\n";