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:\>

In reply to Couldn't used Net::SSH:Perl to access cisco router problem by zhuang.ike

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.