in reply to how to ssh to a cisco device using Net::SSH::Perl

It "shouldn't" be that difficult. What problems are you having?

Post some source so we can see

  • Comment on Re: how to ssh to a cisco device using Net::SSH::Perl

Replies are listed 'Best First'.
Re: Re: how to ssh to a cisco device using Net::SSH::Perl
by Anonymous Monk on Jul 17, 2002 at 21:47 UTC
    I can connect to the router but then an interactive session starts. I'm trying to use a register handle but the subroutine is ignored;
    my $ssh = Net::SSH::Perl->new( $host, cipher => 'DES3', debug => 2, ); $connection = $ssh -> login ("bakerj",$password); #$command = $ssh->cmd("enable"); $ssh->register_handler (SSH_SMSG_STDERR_DATA, sub { my($ssh, $packet) = @_; my $str = $packet->get_str; $packet = $ssh->packet_start(SSH_CMSG_STDIN_DATA); $packet->put_str("enable"); $packet->send; });

    Edit by dws for <code> tags