remote [ssh] Backspace] key gives me "^?"

Chris Keladis ckeladis at gmail.com
Sat Sep 15 15:14:25 PDT 2007


On 9/16/07, Gary Kline <kline at tao.thought.org> wrote:

Hi Gary,

> On Sat, Sep 15, 2007 at 10:58:52AM -0700, Garrett Cooper wrote:
> > Chad Perrin wrote:
> > >On Fri, Sep 14, 2007 at 06:01:03PM -0700, Gary Kline wrote:
> > >
> > >>    Sometimes when I ssh from a remote server and edit a file with
> > >>    vi, my [Backspace keys] are not interpretered correctly.
> > >>    Instead of erasing characters and backing up one byte and
> > >>    clearing that character my cursor moves forward.
> > >>
> > >>    Example: typing "This" as "thos" and backspacing to the 'o'
> > >>    I'll see "thos^?^?"    Can anybody 'splain what idiot thing i'm
> > >>    doing wrong and how to fix it?

When in a problematic SSH session try entering 'stty erase <ctrl-v ctrl-?>'

Then hit the backspace key and see if it behaves as normal.

If that works, then you have a terminal emulation problem, and need to
try some other terms to find one that works for your keyboard (must be
set both client AND server-side).

If you think you really need to edit the keyboard mappings then the
file is /etc/termcap but i strongly recommend trying a few different
terminals (try vt100, linux, xterm, etc) before editing that file.

Remember, they need to be set in pairs, so change the term on both
sides, disconnect, reconnect with the new term, and do your tests.



Hope it helps,

Chris.


More information about the freebsd-questions mailing list