Hi
I have been developing a telnet client in Java designed to connect to telnetd on an AIX 5.1 system. It's a sort of intellectual exercise so I'm not using anyone else's code as a starting point: just the RFC's and man pages. I've hit a brick wall in that the option negotiation appears to 'hang' at a particular point. I've been experimenting with this and the following is the best sequence of commands I've come up with so far in order to get a login prompt displayed.
When I connect to the telnet server, I get no response.
I then send an AYT which produces the following response from telnetd:
DONT Authentication Option /* sub-opt 37 */
DO Terminal Type /* sub-opt 24 */
Based on RFC 854, I assume I must respond to these.
When I send
WONT Authentication option
I get the sequence ' here', complete with intriguing leading space (0x20). This appears to be
a response to the AYT which is worrying as it implies (to me) that the negotiation is out of synch somehow.
Ploughing on I send a 'WILL Terminal Type' to complete this stage of the negotation. At this point, however my application appears to 'block' waiting for a response from telnetd which never comes.
I'd expect a response from telnetd to the effect of 'please send me your terminal type'. Once completed, I'd then expect a login prompt.
I'd be grateful if anyone could shed some light on what's (not) happening.
Regards
I have been developing a telnet client in Java designed to connect to telnetd on an AIX 5.1 system. It's a sort of intellectual exercise so I'm not using anyone else's code as a starting point: just the RFC's and man pages. I've hit a brick wall in that the option negotiation appears to 'hang' at a particular point. I've been experimenting with this and the following is the best sequence of commands I've come up with so far in order to get a login prompt displayed.
When I connect to the telnet server, I get no response.
I then send an AYT which produces the following response from telnetd:
DONT Authentication Option /* sub-opt 37 */
DO Terminal Type /* sub-opt 24 */
Based on RFC 854, I assume I must respond to these.
When I send
WONT Authentication option
I get the sequence ' here', complete with intriguing leading space (0x20). This appears to be
a response to the AYT which is worrying as it implies (to me) that the negotiation is out of synch somehow.
Ploughing on I send a 'WILL Terminal Type' to complete this stage of the negotation. At this point, however my application appears to 'block' waiting for a response from telnetd which never comes.
I'd expect a response from telnetd to the effect of 'please send me your terminal type'. Once completed, I'd then expect a login prompt.
I'd be grateful if anyone could shed some light on what's (not) happening.
Regards