#!/usr/bin/perl use warnings; use strict; use Net::SSH2::Cisco; my $host = ''; my $user = ''; my $password = ''; my $session = Net::SSH2::Cisco->new(host => $host); $session->login(username => $user, password => $password); my $match = '/^.+\[(confirm)\]/'; my $command = 'service-module integrated-Service-Engine 0/0 shutdown'; my @config = $session->cmd(String => $command, Prompt => $match); $session->close; print @config;