zhuang.ike has asked for the wisdom of the Perl Monks concerning the following question:

Hi, i used Net::SSH::Perl of perl moudle to access cisco router,but appeared "PC-200911281232: Entering interactive session." by debug dump.I tryed to solve the problem which refer "https://rt.cpan.org/Public/Dist/Display.html?Name=Net-SSH-W32Perl" to modify relation file but didn't available.

My environment as follows:

Windows xp Net-SSH-Perl-1.34

Have someone met this trouble? thanks!!

use File::HomeDir; $ENV{HOME} = File::HomeDir->my_home; use Net::SSH::Perl; use warnings; $scon = Net::SSH::Perl->new ("10.0.0.2",protocol=>'1,2',port => '22',d +ebug => '1',interactive=>'1',); $scon->login("cisco","cisco"); print "looking around ...\n"; ($output,$errors,$exit) = $scon->cmd("sho ip route"); print $output;
debug dump C:\>perl ssh.pl Name "main::exit" used only once: possible typo at ssh.pl line 9. Name "main::errors" used only once: possible typo at ssh.pl line 9. PC-200911281232: Reading configuration data C:\Documents and Settings\ +Administra tor/.ssh/config PC-200911281232: Reading configuration data /etc/ssh_config PC-200911281232: Connecting to 10.0.0.2, port 22. PC-200911281232: Remote protocol version 1.5, remote software version +Cisco-1.25 PC-200911281232: Net::SSH::Perl Version 1.34, protocol version 1.5. PC-200911281232: No compat match: Cisco-1.25. PC-200911281232: Connection established. looking around ... PC-200911281232: Waiting for server public key. PC-200911281232: Received server public key (768 bits) and host key (5 +12 bits). PC-200911281232: Host '10.0.0.2' is known and matches the host key. PC-200911281232: Encryption type: DES3 PC-200911281232: Sent encrypted session key. PC-200911281232: Received encryption confirmation. PC-200911281232: Trying password authentication. PC-200911281232: Sending command: sho ip route PC-200911281232: Entering interactive session. Terminating on signal SIGINT(2) C:\>

Replies are listed 'Best First'.
Re: Couldn't used Net::SSH:Perl to access cisco router problem
by oldwarrior32 (Sexton) on Jun 17, 2012 at 18:01 UTC

    Did you try deactivating interactive mode?

    interactive=>'0',);

      Yes,i have to deactive.But the result still be same....