libnet-ssh2-perl 0.56-1 libssh2-1:amd64 1.5.0-2 libssh2-1-dev:amd64 1.5.0-2 #### if ($model =~ /$nexus/) { my $output; $sok->timeout(10); @cmdoutput = $sok->cmd( String => "copy startup-config tftp://$tftp_server/$configfile vrf $vrf\n\n\n", Errmode => "return", ); print Dumper @cmdoutput; if ($sok->errmsg){ ($error) = $sok->errmsg; print "Nexus IP: $host: Command failed reason: $error. Trying again...\n" ; $sok->timeout(10); @cmdoutput = $sok->cmd( String => "copy startup-config tftp://$tftp_server/$configfile vrf management\n\n\n", Errmode => "return", ); $sok->waitfor ( String => '#', Timeout => '5', Waitfor_clear => '1', ); print Dumper @cmdoutput; print "Nexus IP: $host: Command failed reason: $error\n" ; } }