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

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
  • Comment on Re: Re: Re: Use Net::SSH to connect to a cisco router

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