exit command in telnet

I'm using telnet from a command prompt under WinXP to connect to an embedded linux target. Part of the target boot sequence involves initiating an exit from a startup shell, by entering 'exit '. Telnet interprets this as terminating the telnet session, the command window returns to a C: prompt. Is there a way that I can get the session to just pass the exit command through and hang in? TIA

Reply to
Bruce Varley
Loading thread data ...

Like many of Window's command line programs, its telnet client is somewhat limited - have you tried alternative clients? If you have a Linux machine you can use that. On Windows you could try msys telnet client (I find Windows unusable until msys is installed to give proper command-line tools), or Tera Term Pro (which is an excellent serial terminal emulator, telnet client and ssh client), or perhaps Putty (also telnet and ssh).

I can't say for sure whether that will fix your problem - but if these /real/ telnet clients can't help you, nothing will (short of writing your own telnet client).

Reply to
David Brown

Like many command line telnet clients, if you specify the host on the command line, when the host disconnects, the default response is to terminate the telnet program as well. Some telnet clients allow you to override that behavior, but the one in Windows is fairly basic.

OTOH, if you run it in command mode (just "telnet"), and then explicitly open the session ("o hostname"), after the host disconnects the telnet client will remain active, waiting for another command.

But if your requirement is having the terminal session itself remain after the "exit", the problem is that it's actually being disconnected by the host. Some more sophisticated telnet clients support automatic logons, and automatic session reconnection, and others allow scripting (where you could reconnect the session after it disconnects).

Reply to
Robert Wessel

On Tue, 14 Feb 2012 15:31:17 +0800, Bruce Varley scribbled:

I find, using the simple client provided by Microsoft, that if you DON'T specify the host name/IP address on the command line that an exit from the target does not cause the client to terminate.

i.e. telnet then enter OPEN diddle as needed exit and you're back in the telnet client

Regards

--
>@
Reply to
Bill Dennen

The Telnet client doesn't do zip with the 'exit' command but the host does: it terminates the connection, which in turn makes Telnet either exit or go back to its own command prompt, depending on how you invoked telnet as Bill says.

Meindert

Reply to
Meindert Sprang

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.