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

[enter] keypress is not immediately sent to target #158

Open
VladimirSergeevichRU opened this issue Jan 6, 2024 · 4 comments
Open

[enter] keypress is not immediately sent to target #158

VladimirSergeevichRU opened this issue Jan 6, 2024 · 4 comments

Comments

@VladimirSergeevichRU
Copy link

We run the sshwifty in docker container.
Session to target is opened as expected, but when we try to send a typed command by pressing [Enter] nothing happens. Pressing any other key after pressing [Enter] does the trick.
E.g. we type command show and press the [Enter] key. Nothing happens.
Then we press another (any) key. The command is sent.

@nirui
Copy link
Owner

nirui commented Jan 7, 2024

Hi, sorry for the inconveniences.

Were you trying to operate a Telnet remote or non-linux shell though Sshwifty? If so, it might not working correctly.

Sshwifty currently only supports sending only LF sequence when enter key is pressed, while some shell expects sequence such as CRLF or CR.

This is a known issue, but I'm currently lack of energy and time to properly test and fix it. Again, sorry for the inconveniences.

@VladimirSergeevichRU
Copy link
Author

Yes, target is a device that has its own telnet server and a hardware console.
An we are actually seeing two issues.

  1. Sshwifty connects via telnet protocol to a device itself. This way, any character we type on the termial gets duplicated.
  2. Sshwifty connects via telnet to a moxa nport, which has a serial connection to a target console port. This way, to have the [Enter] keypress passed, we need to press any other key after [Enter] each time.

Thank you for the answer. We cannot reconfigure the CRLF/LF/CR option for the device's telnet. We tried to set different option for that in moxa, but it didn't help at all.

If you have any ideas were to look, could you nudge us in that direction? We might perhaps be able to fiddle with code a little, or get some debug info, do some tests.
Anyway this is not urgent! Thanks!

@nirui
Copy link
Owner

nirui commented Jan 8, 2024

Well, Sshwifty probably need a complete over haul in order to properly support Telnet, and it takes time to get it right, that's the reason why I hasn't started working on this currently.

The duplicated output problem is probably caused by echoing. Sshwifty supports local as well as remote echos, but the remote needs to tell Sshwifty what to do (some don't).

In addition to that, Sshwifty uses a Terminal called xterm.js, which is a XTerm emulator. So right off the bag it limits which PTY/Shell it can support without proper input/output conversion. And based on my readings, the conversion is not a light work.

All and all, it's not going to happen in a short term. Plus, I need to get quite a few things sorted before I can get back to work on Sshwifty. So don't hold your breath for this. Sorry for the disappointment.

@VladimirSergeevichRU
Copy link
Author

No problem! Thank you very much for your work, and explanation.

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