Comware-Based
cancel
Showing results for 
Search instead for 
Did you mean: 

When logging in from a Linux machine using openssh backspace does not work

ThomasGlanzmann
Frequent Advisor

When logging in from a Linux machine using openssh backspace does not work

Hello,

when logging in using openssh from a Linux system to a comware switch, backspace does not work, however ctrl-h, does.

Is there a trick to enable backspace when connecting from unix based system to a comware switch?

 

Cheers,

       Thomas

 

9 REPLIES
Apachez-
Trusted Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

You are not alone:

 

http://h30499.www3.hp.com/t5/Comware-Based/Telnet-SSH-access-backspace-does-not-work/td-p/2316253

 

Let me know if somebody finds a more solid solution to this problem.

 

A possible workaround (depending on client) might be to dig up how to configure your ssh client to "Delete key sends ^H" as described in:

 

http://www.myteneo.net/blog/-/blogs/hp-comware-can-t-backspace-in-iterm

Apachez-
Trusted Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

Some claims using a different terminal might solve this (like xterm instead of gnome-terminal).

 

Juniper-people has the very same problem by the way =)

 

http://www.juniperforum.com/index.php?topic=3056.0

 

Here is another solution/workaround:

 

http://unix.stackexchange.com/questions/13413/force-telnet-ssh-to-use-crtl-h-for-backspace

 

http://www.ibb.net/~anne/keyboard/keyboard.html

 

Dennis Handly
Acclaimed Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

> backspace does not work, however ctrl-h, does.

 

Your switch is working correctly.   It's your Linux box that's broken/misconfigured.  ;-)

Backspace should be control-H.  You need to check your stty settings on Linux to see what it is sending.

If you see ^? on Linux and ^h on your switch, that's the problem.

 

If you are using putty, there is a configuration setting that you can change for the backspace key.

In my .profile and putty sessions I make sure it is consistently set so erase/backspace is control-H.

ThomasGlanzmann
Frequent Advisor

Re: When logging in from a Linux machine using openssh backspace does not work

Hello,

 

Your switch is working correctly.   It's your Linux box that's broken/misconfigured.  ;-)

 

do you have any proof for that because the track record is clear:

 

- Linux works

- Solaris works

- AIX works

- HP-UX works

- Procurve works

- Cisco works

 

The only thing that does not work is comware switches.

 

When I issue 'stty erase ^H' on my Linux term than it breaks Ctrl-H on Linux but still does not work on Comware switches. So I assume that Comware has somewhere a broken termcap entry and they should fix it.

 

Cheers,

     Thomas

Apachez-
Trusted Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

I can confirm that the method described in http://unix.stackexchange.com/questions/13413/force-telnet-ssh-to-use-crtl-h-for-backspace is good workaround (at least for me, confirmed with both A5820 and A5120 using Ubuntu 13.10).

 

That is (on Ubuntu):

 

1) apt-get install expect

 

2) vi /usr/bin/kbdfix

 

or whatever you wish to call your file.

 

3) Put this into the kbdfix file:

 

#!/usr/bin/expect

#Name this file as kbdfix and make it executable in your path
eval spawn -noecho $argv

interact {
 \177        {send "\010"}
 "\033\[3~"  {send "\177"}
}

 

4) Save the file and set proper permissions on it (for example):

 

chmod 755 /usr/bin/kbdfix

 

5) Now connect to your comware device:

 

kbdfix ssh username@1.2.3.4

 

(where 1.2.3.4 is the ip of your comware-device).

 

And voila! Backspace works as expected :-)

ThomasGlanzmann
Frequent Advisor

Re: When logging in from a Linux machine using openssh backspace does not work

Hello,

I like fixing bugs better than fighting the symptoms and using expect on top of ssh is not really a solution it is a very

ugly workaround that I'm not going to use.

 

Cheers,

     Thomas

sdide
Respected Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

hi,

 

I can confirm that backspace sends ASCII DEL, works fine on comware 7.10 (7.1.035, Release 2210) but doesn't on comware 5.2 ( 5.20.105, Release 6708).
 
I guess you have to use Control-H or if you use gnome-terminal or similar, you can make a special profile for it and make backspace send CONTROL-H. Still it needs a fix or at least a possibility to configure it to make it "act correctly".
 
Regards
 
Søren Dideriksen, Network Administrator
Region Midtjylland
Dennis Handly
Acclaimed Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

>do you have any proof for that because the track record is clear:

 

"works" means it works the way I want it to work.  ;-)

 

>When I issue "stty erase ^H" on my Linux term than it breaks Ctrl-H

 

Breaks it how?  This means when you type a control H, it should erase one char.

It also means your backspace key better be configured to send ^H.

Highlighted
Mariano_B
Occasional Contributor

Re: When logging in from a Linux machine using openssh backspace does not work

Hi There...

I've solved the problem and it's valid for ArubaOS and the old Procurves Switches. The Procurve's hidden commands are the key.

Execute the following commands and it will work perfect:

 

edomtset <enter>

edomtset <enter>

SETTERM vt100 <enter>

exit <enter>

configure terminal <enter>

console terminal vt100 <enter>

terminal type vt100 <enter>

write memory <enter>

reload <enter>

 

 

Greetings from Spain.