sris has asked for the wisdom of the Perl Monks concerning the following question:
hi monks,
when i am runing this program to connect to other system, i am getting the output only if the system is in Private IP, If the system is in Public Ip it is not displaying any output
what is the solution to connect and get the output for the public ip system
use Net::Telnet (); my $t = new Net::Telnet (Timeout => 100, Prompt => '/[^ <-]\>/', Errmo +de => "return") ; $username = "administrator"; $passwd = ""; $t->open("hostname"); $t->login($username, $passwd); @lines = $t->cmd("dir"); print @lines;
20040623 Edit by Corion: Added code tags, fixed linebreaks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: net::Telnet to connect public ip
by gri6507 (Deacon) on Jun 23, 2004 at 12:31 UTC | |
|
Re: net::Telnet to connect public ip
by ambrus (Abbot) on Jun 23, 2004 at 12:35 UTC | |
|
Re: net::Telnet to connect public ip
by iburrell (Chaplain) on Jun 23, 2004 at 16:27 UTC | |
by sris (Initiate) on Jun 24, 2004 at 04:04 UTC | |
by iburrell (Chaplain) on Jun 24, 2004 at 16:01 UTC |