[Bug 2478] New: Escape sequences (starting with ~) don't work when remote shell is BusyBox ash
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Tue Oct 13 07:11:17 AEDT 2015
https://bugzilla.mindrot.org/show_bug.cgi?id=2478
Bug ID: 2478
Summary: Escape sequences (starting with ~) don't work when
remote shell is BusyBox ash
Product: Portable OpenSSH
Version: 7.1p1
Hardware: ix86
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: alexinbeijing at gmail.com
Created attachment 2725
--> https://bugzilla.mindrot.org/attachment.cgi?id=2725&action=edit
Fix
This was originally send directly to the mailing list, but I am also
posting it here as requested by Damien Miller.
This patch was prompted by the observation that SSH escapes (using ~)
don't work at all when the remote shell is BusyBox ash (used by Alpine
Linux and some other minimalist and/or embedded Linux distributions).
This is because the BusyBox shell *always* sends a "query cursor
position" terminal control escape sequence each time you press the
<ENTER> key. Quick as a flash, as your pinky finger is descending
towards the tilda key, the terminal sends back a "report cursor
position" sequence. The result is that the SSH client *never* sees your
tilda as immediately following the newline.
Those ANSI terminal control sequences always begin with "<ESC>[" and
end
with an alphabetic character. Hence the call to isalpha() in my code.
Can someone confirm that isalpha() *always* treats a-z and A-Z as
alphabetic, no matter what the locale is?
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list