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

That's the mod I'm using. Do you know how it can be used to send commands interactively??? thx - Jasper
  • Comment on Re: Re: Use Net::SSH to connect to a cisco router

Replies are listed 'Best First'.
Re: Re: Re: Use Net::SSH to connect to a cisco router
by Cine (Friar) on Jul 17, 2002 at 00:01 UTC
    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