Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hang/crash in PLINK with Windows telnet server

17 views
Skip to first unread message

james_...@hotmail.com

unread,
Mar 8, 2006, 2:30:50 PM3/8/06
to
Please help?

We are using PuTTY's PLINK to programatically communicate with generic
telnet and SSH servers. We need plink's ability to send and receive
via stdin and stdout; we cannot use the Windows telnet client due to
the need for communicating with the process via stdin and stdout (a
shared console will not work in our application). We must also have
open source (or BSD licensed code) and cannot have dependencies upon
Cygwin.

For unit testing of our Windows code, I am connecting to a local
Windows 2003 telnet service (tlntsvr). However, I can only issue one
command: when the second command is issued, the terminal replies with
"What? " and waits for some input. Regardless of what is input at this
point, the plink process will terminate. The "What? " message
*appears* to be generated by the server's instance of CMD.EXE (I cannot
find the text "What?" in plink nor in tlntsvc.exe; only in cmd.exe).

The same problem does not happen with the Windows telnet client, nor
does it happen if I communicate with the telnet server via winsock (no,
I don't really want to write my own client). Also, I do not seem to
have any problems communicating with other telnet servers. However,
this bug makes me very nervious.

Does anyone know of a fix or a work-around? Anyone have more
information on what is going on? Or, perhaps, a recommendation on
another (very lightweight) telnet client? Or combined ssh/telnet
client?

Thanks much!

Jim

Jeffrey Altman

unread,
Mar 8, 2006, 6:09:03 PM3/8/06
to
The Microsoft Telnet client and server when used together negotiate
a special terminal type, NTVT, which turns the telnet client into
a relay for the Windows console. The data structures used in both
directions are binary blobs representing Windows events. There is
no stream as you would think of it for a terminal.

I doubt that Putty implements NTVT.

Jeffrey Altman

Ross Higson

unread,
Mar 9, 2006, 4:44:36 AM3/9/06
to

I'm sure there's a simpler solution, but if you *really* get stuck then
you could try the telnet client in my terminal emulator package
(http://members.optusnet.com.au/~rosshigson/terminal.htm).
The source is fully GPL, but is written in Ada. The telnet program was
included mainly to demonstrate the terminal emulator, but I find I use
it a lot as it works much better than anything else I've tried. It
implements a simple Network Virtual Terminal (in the "telnet_terminal"
package) that takes input and output from a terminal emulator window,
but if you have some familiarity with Ada it would be easy to modify it
to uses stdin and stdout instead.

Jim

unread,
Mar 13, 2006, 1:29:22 PM3/13/06
to
I wrote:

> (no, I don't really want to write my own client)

Well, after much research this turned out to be the best solution and
seems to be working well.

Thanks for the help,

JH

0 new messages