Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Windows Net::Telnet problem

by chas (Priest)
on Jul 05, 2005 at 12:25 UTC ( #472430=note: print w/replies, xml ) Need Help??

in reply to Windows Net::Telnet problem

I've generally found it a bit tricky to get Net::Telnet working properly for particular machines. Something close to the following usually works for me (but seemingly inconsequential changes can cause failure):
use strict; use Net::Telnet; print "passwd: "; my $passwd=<>; chomp($passwd); #passwd not hard-coded in script my $telnet = Net::Telnet->new(Host=>'',Prompt=>'/l +inux63> $ /'); $telnet->waitfor('/login/'); $telnet->print("myusername"); $telnet->waitfor('/Password/'); $telnet->print("$passwd\n"); $telnet->waitfor('/linux63/'); my @lines = $telnet->cmd("somecommand"); #etc $telnet->print("logout\n");


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://472430]
[LanX]: several people told me they like saigon. ..
[choroba]: well, beer is good here, surprisingly
[choroba]: also, I discovered several vegan/vegetarian restaurants, so I can avoid meat
[LanX]: ha ha ... happy Czech :)
[choroba]: been to the War Remnants Museum, too. Quite a brutal experience
[choroba]: but still, small-talk about smuggling guns and how Trump is great with US expats isn't my cup of tea
[LanX]: brutal beer?
[LanX]: met a Canadian yesterday, he suggested building a wall and let the US pay for it

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-02-26 04:35 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (371 votes). Check out past polls.