Ok first let's check your code, is it working? my $cmd = "ssh ssh\@10.40.10.228"; # external command to run, I assume you're using a UNIX in your computer my $line = "show system info"; # Command to run open CLI, " | $cmd "; #Executing the external command, in this case SSH login, you cand find more info in the following link but I prefer to use the backstiks http://www.perlhowto.com/executing_external_commands print CLI "$line\n"; # you have the CLI opened so you just put the command there and print it close CLI; # you close the SSH external session You have a lot of ways to put this working, you can use the Net:SSH module http://search.cpan.org/~schwigon/Net-SSH-Perl-1.37/lib/Net/SSH/Perl.pm And create an script like this one: use Net :: SSH :: Perl ; #Loading the SSH module my $cmd = shift ; #command to execute my $ssh = Net :: SSH :: Perl -> new ( $host ); #opening the SSH session $ssh -> login ( $user , $pass ); #login into the session my ( $stdout , $stderr , $exit ) = $ssh -> cmd ( $cmd ); # the output will be saved in the $stdout varaible If your script is working may be you can try @output = print CLI "$line\n"; # @ indicates it's an array Also the easiest one is that you already set up SSH keys betwen the PA FW and your script machine. https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2 my @output = `ssh root@1.1.1.1 "which perl"` ; There is more info in the next link http://stackoverflow.com/questions/2848725/how-can-i-ssh-inside-a-perl-script
... View more