myserver ~ >ssh user@1.2.3.4 TACACS+ Password: Router#exit Connection to 1.2.3.4 closed by remote host. Connection to 1.2.3.4 closed. myserver ~ > #### sub anoc2server { ### Start the SCP my ($user, $passwd, $dstserver, $srcpathfile, $dstpathfile) = @_; my $scp = Net::SCP::Expect->new(host=>$dstserver, user=>$user, password=>$passwd); {$scp->scp($srcpathfile,$dstpathfile);}} }