A
A
Andrew2020-01-12 19:06:11
ubuntu
Andrew, 2020-01-12 19:06:11

How to change the end of line character in a telnet session?

Hello.
There was a problem using telnet commands in Ubuntu.
I am connecting from ubunta to another linux host (BusyBox) and I am faced with the fact that some commands "do not work".
During the trial, it turned out that some commands "do not see" the end of the line (eol) and yet the commands need to send an additional control character (whether ^M or ^J has not figured it out yet). Then the command understands the end of the line and accepts the command for execution.
For example, the GUI version of PuTTY has a special checkbox (replace ^M with Enter and everything works in putty).
I also figured out that you can replace the eol control character using the stty utility.
But I can't find how to do it!
Help me to understand!
How to change the eol control character using the stty utility.
For example now at me stty - a produces:
... eof = ^D; eol = ; eol2 = ; ...
in my case eol is not defined at all.
How to solve the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vadim Priluzkiy, 2020-01-12
@Oxyd

stty eol ^M

K
Karpion, 2020-01-12
@Karpion

Perhaps digging into the /etc/termcap file (on the host you're connecting to) and/or setting the TERM environment variable (on the terminal session) might help.
Although the version from Vadim Priluzkiy also deserves attention. But he did not say on what machine it should be done.

C
CityCat4, 2020-01-13
@CityCat4

Editing the term cap and writing the name of the corrected one, if the client of course supports this. I came across this on FreeBSD a long time ago though, I specially tweaked /etc/termcap. You can also sort through the available names in the termcap.
By the way, the term cap element does not have to be defined at all :) if not, no, it is simply written.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question