in reply to Use Net::SSH to connect to a cisco router

I have better experience with Net::SSH::Perl, so I suggest you have a look at that.

T I M T O W T D I
  • Comment on Re: Use Net::SSH to connect to a cisco router

Replies are listed 'Best First'.
Re: Re: Use Net::SSH to connect to a cisco router
by Anonymous Monk on Jul 16, 2002 at 23:58 UTC
    That's the mod I'm using. Do you know how it can be used to send commands interactively??? thx - Jasper
      Isn't that just reading from STDIN, sending the command to the other end of the line and then printing the result on your screen? Or have I missunderstood your question?

      T I M T O W T D I
        Yes, that's it, but I get stumped on how to carry that out;
        #!/usr/local/bin/perl use Net::SSH::Perl(); use Net::SSH::Perl::Cipher(); system("stty -echo"); print "Username: "; chomp($username = <STDIN>); print "\n"; print "Password: "; chomp($password = <STDIN>); print "\n"; print "hostname: "; chomp($host = <STDIN>); print "\n"; system("stty echo"); my $ssh = Net::SSH::Perl->new( $host, cipher => Net::SSH::Perl::Cipher::name(DES3), debug => 1, ); #$connection = $ssh -> ($username); #@command = $ssh->cmd("enable"); #print @command;
        - Jasper
A reply falls below the community's threshold of quality. You may see it by logging in.