Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: connect to a remote ip

by chennaiite (Sexton)
on Aug 19, 2005 at 05:30 UTC ( #485021=note: print w/ replies, xml ) Need Help??


in reply to Re: connect to a remote ip
in thread Reaped: connect to a remote ip

Use Net::Telnet;
print "Enter IP";
my $var=<STDIN>;
chomp $var;
print "Enter User";
my $user=<STDIN>;
chomp $user;
print "Enter Password";
my $pass=<STDIN>;
chomp $pass;
#$telnet = new Net::Telnet->new( Timeout=>100,Prompt => '/\$%#> $/');
$telnet = new Net::Telnet->new( Timeout=>100 );
$telnet->open($var);
$telnet->login($user,$pass);
#SAMPLE copy
$telnet->cmd("echo $1 > file");
$telnet->close;
This is my script but not fullfill my task...
I will be giving the ip address, username and passward.
After connecting i will be update an winnt file...
Then logoff,thats all,After that i will doing some other manipulation in local.


Comment on Re^2: connect to a remote ip

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://485021]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-07-11 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (224 votes), past polls