Hi Folks,

I am trying to connect to a server where i want to create a file or read a
existing file.
This is my code.

#!/usr/bin/perl
use Net::Telnet ();
$t = new Net::Telnet (Timeout => 10,
                          Prompt => '/] $/');
# My prompt will be looking after telnet session like this "[
ekus...@lxlogin-2-wip ~ ]"
$t->open("172.16.246.14");
$username = "ekusure";
$passwd = "qwert123";
$t->login($username, $passwd);
 @lines = $t->cmd("who");
 print @lines;


I am getting an error
timed-out waiting for a command prompt at ./telnetserver line 8

Can someone show lights on this?

-- 
Thanks,
Suresh

Reply via email to