What's new

Issue when trying to access router with telnet

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

William Higgs

New Around Here
Hello all. New to these forums and ASUS WRT Merlin firmware, and I got to say, so far I am loving it. I own a RT-AC1750 router and decided to install the custom firmware (RT-AC66U_380.69_0.zip package) due to the fact that my internet connection kept getting reset while using the latest custom firmware. I mean I tried everything: factory resets, re-updating to latest firmware after factory resets, etc, etc. Ever since I installed the custom firmware this morning, no issues. However, there is a little....quirk....I noticed when I try to use telnet to access my router. When the console prompts me for the user name, hitting backspace to erase mistyped characters will instead add the characters "^H" to the console, essentially requiring that the username and password (yes I confirmed this with the password prompt too) be typed correctly with no mistakes in order to login to the router via telnet. Not a major issue, but one that I hope to see fixed nonetheless.
 
Hello all. New to these forums and ASUS WRT Merlin firmware, and I got to say, so far I am loving it. I own a RT-AC1750 router and decided to install the custom firmware (RT-AC66U_380.69_0.zip package) due to the fact that my internet connection kept getting reset while using the latest custom firmware. I mean I tried everything: factory resets, re-updating to latest firmware after factory resets, etc, etc. Ever since I installed the custom firmware this morning, no issues. However, there is a little....quirk....I noticed when I try to use telnet to access my router. When the console prompts me for the user name, hitting backspace to erase mistyped characters will instead add the characters "^H" to the console, essentially requiring that the username and password (yes I confirmed this with the password prompt too) be typed correctly with no mistakes in order to login to the router via telnet. Not a major issue, but one that I hope to see fixed nonetheless.
That's how it works with input prompts in scripts. This is an input field and it reads it as-is unlike the command prompt.
 
When the console prompts me for the user name, hitting backspace to erase mistyped characters will instead add the characters "^H" to the console, essentially requiring that the username and password (yes I confirmed this with the password prompt too) be typed correctly with no mistakes in order to login to the router via telnet. Not a major issue, but one that I hope to see fixed nonetheless.

That's an issue with your termcap on the client side - as most PC's based on Redmond's Boil on Satan's butt treat backspace and delete... and on telnet, one expects the righ^h^h^ht encoding there...
 
That's an issue with your termcap on the client side - as most PC's based on Redmond's Boil on Satan's butt treat backspace and delete... and on telnet, one expects the righ^h^h^ht encoding there...
The -e switch does that for read. But it is not available in the BusyBox on the router.
 
$ stty -a
speed 9600 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;


Then remap it in the stty...
 
bash the busybox - yeah, it's been a long flight home - HKG to SAN via LAX...
I don't think it would make sense to add it to BusyBox, if possible at all.
One would have to check if the switch is available before prompting with read -e VAR. If I do it on BB the terminal has a meltdown.
 
I don't think it would make sense to add it to BusyBox, if possible at all.
One would have to check if the switch is available before prompting with read -e VAR. If I do it on BB the terminal has a meltdown.

LOL, not proposing to add bash to busybox - more like busybox is awesome, but not as complete as bash...

and as mentioned above -- busybox is what it is...

Folks shouldn't use telnet as it is - ssh is always better, but even there, one does tend to run into some interesting terminal items - and if I recall, putty might have those settings for the connection profile to map out erase to backspace and delete...
 
Well, what i do know is that once I login to the router via telnet, i can use the backspace perfectly fine. Furthermore, I was able to use the backspace at the telnet login screen when the stock firmware was installed. No matter how you look at it, the behavior reported in the original post is not normal behavior.
 
No matter how you look at it, the behavior reported in the original post is not normal behavior.
Having worked on numerous flavours of Unix over many decades I can say that the "Is the erase key a Backspace or Delete character?" dilemma is unfortunately normal behaviour. The reasons are historical and too long and tedious to go into, but as mentioned by @sfx2000 it's all tied in with termcap's. Once the client has logged in any incorrect key mappings can be corrected either by the client device or by stty. However as you have discovered this doesn't help you in the pre-login phase.

At pre-login you need to get your client software to match what is expected by the server. For the last decade or so most implementations expect the "erase" key to be Delete (0x7f in ASCII). Terminal clients like PuTTY allow you to choose what character to send, but nowadays Delete is the sensible choice.

Microsoft obviously likes to live in the 1970's :rolleyes: so their default character is Backspace (0x08 in ASCII). You can change Microsoft's Telnet behaviour by issuing a "set bsasdel" command:
Code:
Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Microsoft Telnet> set ?
bsasdel         Backspace will be sent as delete
crlf            New line mode - Causes return key to send CR & LF
delasbs         Delete will be sent as backspace
escape x        x is an escape charater to enter telnet client prompt
localecho       Turn on localecho.
logfile x       x is current client log file
logging         Turn on logging
mode x          x is console or stream
ntlm            Turn on NTLM authentication.
term x          x is ansi, vt100, vt52, or vtnt
Microsoft Telnet> set bsasdel
Backspace will be sent as delete
Microsoft Telnet> open RT-AC68U
Connecting To RT-AC68U...
EDIT: Changes made to the MS Telnet client appear to be persistent.
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top