in reply to Using Net::Telnet::Cisco toTelnet from Host to Host

You cant do this with Net::Telnet::Cisco the way it sounds like you are wanting it to act...You may have to go into somthing like this using just Socket...Somthing like this:
#!/usr/bin/perl use Socket; # no its a quicky, i didnt use strict..its hard to write # code in this text box $HOSTNAME = "hostname.of.router"; $TELNETTO = "where.to.telnet.to.from.hostname"; $USER = "username"; $PASS = "password"; while (1) { socket(SOCK,PF_INET,SOCK_STREAM,getprotobyname('tcp')); connect(SOCK, sockaddr_in(23,inet_aton("$HOSTNAME"))); select(SOCK); $|=1; select('stdout'); print SOCK "$USER\n"; while(<SOCK>) { ($stuff) = split(/\s+$/,$_); if ($stuff =~ /Password:/) { print SOCK "$PASS\n"; } if ($stuff =~ /\>$/) { # we have user access print SOCK "telnet $TELNETTO"; # do some matching on its prompt } } exit; }
hope this helps a bit...its kinda what I had to do to get extended ping sweeps to work before.