Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for TELNET protocol? #3

Open
urseppenberger opened this issue Jul 23, 2022 · 3 comments
Open

Support for TELNET protocol? #3

urseppenberger opened this issue Jul 23, 2022 · 3 comments

Comments

@urseppenberger
Copy link

I found your library through a hint of hackaday. Congratulations and many thanks.

I use the ESP32 and ESP8266 chips for home automation. Some of them are connected to mains power.
It is therefore much safer for my laptop, if I connect using WiFi to the devices instead of a serial connection.
I use a TELNET library for this.
Your serial library is much more advanced and offers interesting functions to look at the system itself.
Would it be possible for you to support the TELNET protocol?

Kind regards,
Urs.

@jbtronics
Copy link
Owner

In Principle this should be possible: Telenet as a protocol is pretty simple (more or less just a simple TCP connection). The challenge I see is to connect the telnet connection to stdin and stdout (which are used for the input and output of the commands), especially if you wanna use both serial terminal and telnet connection.

Another point I worry about, is that telnet is pretty unsafe, as it has no support for encryption or built-in authentication. As ESP32Console let you do many security critical things, exposing it via telnet will introduce a large security hole in many projects.

@urseppenberger
Copy link
Author

Many thanks for your detailed feedback on my question. Your points are definitely valid.

The first point could be solved by just allowing one connection, either via TCP or via Serial.

The second point is more difficult. TELNET is a deprecated protocol by the IETF since it does not support encryption.
Encryption would mean to implement SSH instead of TELNET, I did not dare to ask for this.
A first line of defence could be username/password to have at least a simple authentication, this is better than nothing.
Secondly TELNET access should only enabled for test devices, not for operational devices.

@jbtronics
Copy link
Owner

Somebody have ported libssh for the ESP32 so in theory it should be possible to implement SSH. The problem is that libssh is pretty low level and you have to write much code to use it properly (at least that's what it looked like from the examples).
Also I don't know how much flash and RAM this needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants