CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Password Authentication

 



samsneelam
New User

Jun 16, 2008, 9:25 PM

Post #1 of 2 (1052 views)
Password Authentication Can't Post

Hello,
This is samuel, I got a problem while writing a script for the zebra configuration. Basically when i type

# telnet localhost zebra

it opens a zebra customised shell "vtysh" and asks for password, then i should give password, then a "vtysh" got opened and the operation will follow on. So I want a script file for the above process, i wrote like this:
...........................................................................................................
$str1="telnet";
$str2="localhost";
$str3="zebra";
$pid=open(WRITEME, "| $str1 $str2 $str3");
print WRITEME $str3;
close (WRITEME);
.........................................................................................

But the output comes like this
..................................................................................................
[root@localhost perl-exercises]# perl sample2.p
Trying ::1...
Connected to localhost.localdomain (::1).
Escape character is '^]'.

Hello, this is zebra (version 0.95a).
Copyright 1996-2004 Kunihiro Ishiguro.


User Access Verification

Password: Connection closed by foreign host.
[root@localhost perl-exercises]#
...........................................................................................
~

CAN ANYBODY HELP ME IN THIS REGARD............ THANKS IN ADVANCE


meloyelo
User

Jun 16, 2008, 10:34 PM

Post #2 of 2 (1049 views)
Re: [samsneelam] Password Authentication [In reply to] Can't Post

Try using the Net::Telnet module. Another option is the Expect.pm module.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives