Hullo!
I'm experimenting with Telnet over TLS/SSL (direct TLS, not STARTTLS). Unfortunately the only open source client I found is the Debian Netkit telnet-ssl. Do you know any other Telnet client that supports TLS connections?
I did have success with putty/puttytel and plink (from putty-tools) with the proxy command option and openssl s_client, like
$ plink -telnet -proxycmd "openssl s_client -quiet %host:992" example.com
On the server side, I'm using stunnel (or nginx) as TLS reverse proxy. Fun part is that you can use the same port to proxy to different telnet servers depending on the domain/servername (SNI).
What drove me nuts was the display of the replacement character � (rhombus with ?) whenever I typed/send Ctrl-C or Ctrl-Z. I figured out that it is the character with the byte value 242; or in Telnet-speak the control character DM (data mark). Turned out some older protocols and software are using the TCP "urgent" mechanism / flag / indication, which I never heard of before. (see
https://packetlife.net/blog/2011/mar/2/tcp-flags-psh-and-urg/#the-urg-flag)
The Inetutils telnet server that I am using can only run as an inetd service (stdin/stdout). So even it does not run as standalone daemon and does not handle TCP sockets itself, it still has some code in the source that handles TCP urgent indication. It took me hours to figure out the cause of the unwanted character, but I still don't understand exactly why it only happens when I use a proxy command and/or the TLS proxy with the telnet-ssl. The fix was to comment out the line "set_neturg ();" in telnetd.c and recompile.
Why telnet over TLS (and not ssh)?
a) Because.
Why not?!
b) Telnet is a much simpler protocol than SSH, but good enough that it's not different after login for simple remote terminal usage.
c) There is still some BBS software that supports telnet, but not ssh. I guess it's possible to use some SSH-to-Telnet proxy, but tunneling through TLS is much simpler. You can also do telnet client -> stunnel (client) -> stunnel (server) -> telnet server.
d) It's retro and it works. It doesn't deserve to be abandoned.
---
* Origin: War is Peace. Freedom is Slavery. Ignorance is Strength. (21:3/102)