Comware

 View Only
last person joined: 3 days ago 

Expand all | Collapse all

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

This thread has been viewed 1 times
  • 1.  When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 05, 2014 05:06 PM

    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

     


    #ssh


  • 2.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 05, 2014 07:18 PM

    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



  • 3.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 05, 2014 07:32 PM

    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

     



  • 4.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 06, 2014 01:22 AM

    > 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.


    #stty


  • 5.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 06, 2014 02:04 AM

    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



  • 6.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 06, 2014 08:07 AM

    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 :-)



  • 7.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 07, 2014 01:01 AM

    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



  • 8.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 07, 2014 04:03 AM

    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
     


  • 9.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Jan 12, 2014 06:33 AM

    >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.



  • 10.  RE: When logging in from a Linux machine using openssh backspace does not work

    Posted Feb 12, 2018 05:11 AM

    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.