Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Telnet Command Prompt Help

by Gilimanjaro (Hermit)
on Jan 29, 2003 at 16:15 UTC ( [id://230990]=note: print w/replies, xml ) Need Help??


in reply to Telnet Command Prompt Help

Using telnet is usually a bad idea, unless you yourself are sitting behind the keyboard; that's what it was designed for.

Update: Actually, even when behind the keyboard ssh is a much better idea because of encryption and such...

If you need to execute commands ssh (Net::SSH) is the way to go. Depending on what it is you exactly need to do, using other protocols might also be an option...

If you really are stuck with telnet a small trick that might be helpful is to blindly send the command 'echo $PS1' to the session. That will return the sequence that is used to build the prompt... But it's not identical to the prompt you'll be getting. Problem is that the prompt can change, if there are special sequences in the PS1 variable.

I should point out that even this only works for the most commen *nix shells... I can telnet to my printer if I want, and that can give me another total unpredictable prompt.

I'd try to find another way to access your server if I were you...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-29 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found