Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

net::telnet

Status
Not open for further replies.

malpa

Technical User
Joined
Feb 8, 2004
Messages
122
Location
CO
Hi,


I want to connect to this machine (ericsson switch) usign net:telnet, but this connection request USERCODE insted of login.

i don´t know how do this.


[crf][/]>telnet 10.204.52.12
Trying...
Connected to 10.204.52.12.
Escape character is '^]'.
USERCODE:xxxxxx
PASSWORD:xxxxxx
WO BA02 CO64 CNG3 CE04 NVT-432 TIME 061101 1700 PAGE 1
<

Thanks

malpa

 
so are u asking how Net::Telnet can help? if it's passwd protected u'll uid/passwd if when Net::Telnet is used. Have you looked on CPAN at other options?
 
Hi,


Login prompt must match either of these case insensitive patterns:

/login[: ]*$/i
/username[: ]*$/i


Password prompt must match this case insensitive pattern:

/password[: ]*$/i



In my case the prompt is USERCODE and password prompt is PASSWORD.

What do i do to that my program recognize USERCODE: prompt.



Thanks a lot


malpa
 
Do you have access to the Telnet.pm. Make a backup of it and try appending the following line to match ur needs.

NOT TESTED.

Code:
 ## Wait for login prompt.
    $self->waitfor(Match => '/login[: ]*$/i',
                   Match => '/username[: ]*$/i',
                   Match => '/USERCODE[: ]*$/i',
                   Errmode => "return")

 
If you are running your perl script from an Ericsson OMC, you could find out what is the "Ericcson process" that is running on Ericsson OMCallow access this Network element.

For instance:

In nokia equipment you could say:

$openNokiaswitch = `exemmlmx -i SWITCHNAME -c \"$COMMAND\" 2>&1`;
In order to identify what's the process, just open a Switch session in the OMC and then execute the command:

ps -ef | grep "yourusername"

And then you will identify the process name



dmazzini
GSM System and Telecomm Consultant

 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top