Backspace, Tab not working in terminal (using ssh)












31















When I ssh into another machine with Debian with my account(with sudo permissions), my backspace key generates some awkward symbols on pressing. Also Tab & del keys don't work too.



On the other hand, I also have another account on the same machine & when I ssh through this account, its terminal works perfectly fine. I couldn't figure out why is this happening.










share|improve this question

























  • Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings?

    – Kevin
    Jul 15 '12 at 11:36











  • @Kevin How to check for that?

    – gopi1410
    Jul 15 '12 at 11:58











  • Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question!

    – Kevdog777
    Aug 14 '12 at 13:57
















31















When I ssh into another machine with Debian with my account(with sudo permissions), my backspace key generates some awkward symbols on pressing. Also Tab & del keys don't work too.



On the other hand, I also have another account on the same machine & when I ssh through this account, its terminal works perfectly fine. I couldn't figure out why is this happening.










share|improve this question

























  • Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings?

    – Kevin
    Jul 15 '12 at 11:36











  • @Kevin How to check for that?

    – gopi1410
    Jul 15 '12 at 11:58











  • Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question!

    – Kevdog777
    Aug 14 '12 at 13:57














31












31








31


15






When I ssh into another machine with Debian with my account(with sudo permissions), my backspace key generates some awkward symbols on pressing. Also Tab & del keys don't work too.



On the other hand, I also have another account on the same machine & when I ssh through this account, its terminal works perfectly fine. I couldn't figure out why is this happening.










share|improve this question
















When I ssh into another machine with Debian with my account(with sudo permissions), my backspace key generates some awkward symbols on pressing. Also Tab & del keys don't work too.



On the other hand, I also have another account on the same machine & when I ssh through this account, its terminal works perfectly fine. I couldn't figure out why is this happening.







linux debian terminal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 9 '16 at 8:39









Mongrel

2,08131546




2,08131546










asked Jul 15 '12 at 11:13









gopi1410gopi1410

259135




259135













  • Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings?

    – Kevin
    Jul 15 '12 at 11:36











  • @Kevin How to check for that?

    – gopi1410
    Jul 15 '12 at 11:58











  • Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question!

    – Kevdog777
    Aug 14 '12 at 13:57



















  • Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings?

    – Kevin
    Jul 15 '12 at 11:36











  • @Kevin How to check for that?

    – gopi1410
    Jul 15 '12 at 11:58











  • Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question!

    – Kevdog777
    Aug 14 '12 at 13:57

















Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings?

– Kevin
Jul 15 '12 at 11:36





Could be a keyboard and text encoding issue, do they all use the same language and keyboard settings?

– Kevin
Jul 15 '12 at 11:36













@Kevin How to check for that?

– gopi1410
Jul 15 '12 at 11:58





@Kevin How to check for that?

– gopi1410
Jul 15 '12 at 11:58













Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question!

– Kevdog777
Aug 14 '12 at 13:57





Occasionally mine does it too. But my backspace is acting like my return (Enter) key. @gopi1410, you're not the only one with this issue +1 for the question!

– Kevdog777
Aug 14 '12 at 13:57










7 Answers
7






active

oldest

votes


















31














I have seen such problems before.



Take the backspace for example, the remote host expects some character to be used as "erase/backspace" , while you pressing backspace in the terminal , the terminal program will send some character to the remote host, if what the remote host expects diffs with the characters sent by the terminal program, you would encounter this issue. So a quick fix is as below:




  1. run command #stty -a in the remote host, and find what is expected to be an erase code in the output. Say erase=^?.

  2. In the terminal, type Ctrlv and press your backspace. You'll see what code is sent as "erase". Say it is ^H.

  3. In the remote host, run #stty erase ^H.
    (Note: use Ctrlv + Backspace, do not type the ^ manually)


You can fix the Tab issue with the same as above.






share|improve this answer


























  • My backspace character is some special symbol something like an inverted triangle. So its not working

    – gopi1410
    Jul 16 '12 at 10:26






  • 1





    This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

    – Paulo Matos
    Aug 13 '15 at 8:08











  • This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

    – Samuel
    Aug 18 '15 at 22:24








  • 1





    What if no code at all is sent? Ctrlv + backspace produces nothing...

    – Manfredo
    Jul 31 '17 at 8:24



















21














Beside "stty" solution, you may try the "TERM" solution.



You ssh to your Debian from some terminal (putty, solaris dterm, debain xterm, you-name-it), this termninal announce capabilities (which includes keys such as Backspace and Tab) via TERM environment variable.



So, after ssh to unix host (it doesn't depend debian it or other host) set the TERM variable according to your terminal. Consider you're using bash as shell and vt100 as terminal:



export TERM=vt100


ps: TERM should be announced via ssh automagically, but in some circumstances this magic fails.






share|improve this answer
























  • still doesn't work :(

    – gopi1410
    Aug 14 '12 at 17:49











  • What terminal are you using? And what the value of TERM you have tried?

    – paul
    Aug 15 '12 at 6:23











  • I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

    – gopi1410
    Aug 15 '12 at 12:30











  • Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

    – paul
    Aug 16 '12 at 4:13













  • Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

    – gopi1410
    Aug 16 '12 at 6:35



















11














This is because your default shell is sh, to use bash, just run bash from your shell.



bash


To set bash as your default shell:



chsh -s /bin/bash 


or



sudo chsh -s /bin/bash yourusername





share|improve this answer


























  • This one fixed it for me. Never even though to look at my login shell!

    – James Pack
    Jul 3 '17 at 17:19



















7














Your shell may be set to /bin/sh instead of /bin/bash






share|improve this answer





















  • 1





    Related to this answer: unix.stackexchange.com/questions/50542/…

    – Samuel
    Sep 3 '15 at 18:36






  • 1





    cyberciti.biz/faq/howto-set-bash-as-your-default-shell

    – teynon
    Dec 16 '15 at 2:52











  • This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

    – Jake
    Mar 28 '16 at 14:40



















4














I usually use this to fix any funky character output in my terminal. It resets all the special characters to their default values.



stty sane


From the stty man page:




same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke, all special characters to their default values







share|improve this answer
























  • Backspace is working but tab still fails.

    – Udo
    May 3 '17 at 7:12



















1














on top of paul's answer, if you want to retain the ability to have colorful output, you can use xterm-88color



echo 'export TERM=xterm-88color' >> ~/.bashrc
source ~/.bashrc





share|improve this answer































    0














    # stty -a
    speed 38400 baud; rows 34; columns 134; line = 0;
    intr = ^C; quit = ^; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
    <undef>; swtch = <undef>; start = ^Q; stop = ^S;
    susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
    -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
    -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -
    iuclc -ixany imaxbel -iutf8
    opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
    echoke


    My home key prints a ^[[1~, as per @Derui Si's solution my backspace key is working fine not sure what to do for home key.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f43103%2fbackspace-tab-not-working-in-terminal-using-ssh%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      7 Answers
      7






      active

      oldest

      votes








      7 Answers
      7






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      31














      I have seen such problems before.



      Take the backspace for example, the remote host expects some character to be used as "erase/backspace" , while you pressing backspace in the terminal , the terminal program will send some character to the remote host, if what the remote host expects diffs with the characters sent by the terminal program, you would encounter this issue. So a quick fix is as below:




      1. run command #stty -a in the remote host, and find what is expected to be an erase code in the output. Say erase=^?.

      2. In the terminal, type Ctrlv and press your backspace. You'll see what code is sent as "erase". Say it is ^H.

      3. In the remote host, run #stty erase ^H.
        (Note: use Ctrlv + Backspace, do not type the ^ manually)


      You can fix the Tab issue with the same as above.






      share|improve this answer


























      • My backspace character is some special symbol something like an inverted triangle. So its not working

        – gopi1410
        Jul 16 '12 at 10:26






      • 1





        This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

        – Paulo Matos
        Aug 13 '15 at 8:08











      • This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

        – Samuel
        Aug 18 '15 at 22:24








      • 1





        What if no code at all is sent? Ctrlv + backspace produces nothing...

        – Manfredo
        Jul 31 '17 at 8:24
















      31














      I have seen such problems before.



      Take the backspace for example, the remote host expects some character to be used as "erase/backspace" , while you pressing backspace in the terminal , the terminal program will send some character to the remote host, if what the remote host expects diffs with the characters sent by the terminal program, you would encounter this issue. So a quick fix is as below:




      1. run command #stty -a in the remote host, and find what is expected to be an erase code in the output. Say erase=^?.

      2. In the terminal, type Ctrlv and press your backspace. You'll see what code is sent as "erase". Say it is ^H.

      3. In the remote host, run #stty erase ^H.
        (Note: use Ctrlv + Backspace, do not type the ^ manually)


      You can fix the Tab issue with the same as above.






      share|improve this answer


























      • My backspace character is some special symbol something like an inverted triangle. So its not working

        – gopi1410
        Jul 16 '12 at 10:26






      • 1





        This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

        – Paulo Matos
        Aug 13 '15 at 8:08











      • This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

        – Samuel
        Aug 18 '15 at 22:24








      • 1





        What if no code at all is sent? Ctrlv + backspace produces nothing...

        – Manfredo
        Jul 31 '17 at 8:24














      31












      31








      31







      I have seen such problems before.



      Take the backspace for example, the remote host expects some character to be used as "erase/backspace" , while you pressing backspace in the terminal , the terminal program will send some character to the remote host, if what the remote host expects diffs with the characters sent by the terminal program, you would encounter this issue. So a quick fix is as below:




      1. run command #stty -a in the remote host, and find what is expected to be an erase code in the output. Say erase=^?.

      2. In the terminal, type Ctrlv and press your backspace. You'll see what code is sent as "erase". Say it is ^H.

      3. In the remote host, run #stty erase ^H.
        (Note: use Ctrlv + Backspace, do not type the ^ manually)


      You can fix the Tab issue with the same as above.






      share|improve this answer















      I have seen such problems before.



      Take the backspace for example, the remote host expects some character to be used as "erase/backspace" , while you pressing backspace in the terminal , the terminal program will send some character to the remote host, if what the remote host expects diffs with the characters sent by the terminal program, you would encounter this issue. So a quick fix is as below:




      1. run command #stty -a in the remote host, and find what is expected to be an erase code in the output. Say erase=^?.

      2. In the terminal, type Ctrlv and press your backspace. You'll see what code is sent as "erase". Say it is ^H.

      3. In the remote host, run #stty erase ^H.
        (Note: use Ctrlv + Backspace, do not type the ^ manually)


      You can fix the Tab issue with the same as above.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jan 12 '16 at 14:20









      aweibell

      1033




      1033










      answered Jul 15 '12 at 13:10









      Derui SiDerui Si

      45944




      45944













      • My backspace character is some special symbol something like an inverted triangle. So its not working

        – gopi1410
        Jul 16 '12 at 10:26






      • 1





        This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

        – Paulo Matos
        Aug 13 '15 at 8:08











      • This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

        – Samuel
        Aug 18 '15 at 22:24








      • 1





        What if no code at all is sent? Ctrlv + backspace produces nothing...

        – Manfredo
        Jul 31 '17 at 8:24



















      • My backspace character is some special symbol something like an inverted triangle. So its not working

        – gopi1410
        Jul 16 '12 at 10:26






      • 1





        This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

        – Paulo Matos
        Aug 13 '15 at 8:08











      • This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

        – Samuel
        Aug 18 '15 at 22:24








      • 1





        What if no code at all is sent? Ctrlv + backspace produces nothing...

        – Manfredo
        Jul 31 '17 at 8:24

















      My backspace character is some special symbol something like an inverted triangle. So its not working

      – gopi1410
      Jul 16 '12 at 10:26





      My backspace character is some special symbol something like an inverted triangle. So its not working

      – gopi1410
      Jul 16 '12 at 10:26




      1




      1





      This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

      – Paulo Matos
      Aug 13 '15 at 8:08





      This simple comment is certainly the best solution I have seen to this. It feels like a kludge but it works.

      – Paulo Matos
      Aug 13 '15 at 8:08













      This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

      – Samuel
      Aug 18 '15 at 22:24







      This worked for me! What I don't understand though is why my shell handles backspace as expected, but reading from stdin in my app does not. Doing your suggested change results in backspace working for both. My understanding is that the shell handles stdin buffering, so shouldn't the backspace-handling be the same for both the shell and an app?

      – Samuel
      Aug 18 '15 at 22:24






      1




      1





      What if no code at all is sent? Ctrlv + backspace produces nothing...

      – Manfredo
      Jul 31 '17 at 8:24





      What if no code at all is sent? Ctrlv + backspace produces nothing...

      – Manfredo
      Jul 31 '17 at 8:24













      21














      Beside "stty" solution, you may try the "TERM" solution.



      You ssh to your Debian from some terminal (putty, solaris dterm, debain xterm, you-name-it), this termninal announce capabilities (which includes keys such as Backspace and Tab) via TERM environment variable.



      So, after ssh to unix host (it doesn't depend debian it or other host) set the TERM variable according to your terminal. Consider you're using bash as shell and vt100 as terminal:



      export TERM=vt100


      ps: TERM should be announced via ssh automagically, but in some circumstances this magic fails.






      share|improve this answer
























      • still doesn't work :(

        – gopi1410
        Aug 14 '12 at 17:49











      • What terminal are you using? And what the value of TERM you have tried?

        – paul
        Aug 15 '12 at 6:23











      • I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

        – gopi1410
        Aug 15 '12 at 12:30











      • Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

        – paul
        Aug 16 '12 at 4:13













      • Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

        – gopi1410
        Aug 16 '12 at 6:35
















      21














      Beside "stty" solution, you may try the "TERM" solution.



      You ssh to your Debian from some terminal (putty, solaris dterm, debain xterm, you-name-it), this termninal announce capabilities (which includes keys such as Backspace and Tab) via TERM environment variable.



      So, after ssh to unix host (it doesn't depend debian it or other host) set the TERM variable according to your terminal. Consider you're using bash as shell and vt100 as terminal:



      export TERM=vt100


      ps: TERM should be announced via ssh automagically, but in some circumstances this magic fails.






      share|improve this answer
























      • still doesn't work :(

        – gopi1410
        Aug 14 '12 at 17:49











      • What terminal are you using? And what the value of TERM you have tried?

        – paul
        Aug 15 '12 at 6:23











      • I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

        – gopi1410
        Aug 15 '12 at 12:30











      • Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

        – paul
        Aug 16 '12 at 4:13













      • Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

        – gopi1410
        Aug 16 '12 at 6:35














      21












      21








      21







      Beside "stty" solution, you may try the "TERM" solution.



      You ssh to your Debian from some terminal (putty, solaris dterm, debain xterm, you-name-it), this termninal announce capabilities (which includes keys such as Backspace and Tab) via TERM environment variable.



      So, after ssh to unix host (it doesn't depend debian it or other host) set the TERM variable according to your terminal. Consider you're using bash as shell and vt100 as terminal:



      export TERM=vt100


      ps: TERM should be announced via ssh automagically, but in some circumstances this magic fails.






      share|improve this answer













      Beside "stty" solution, you may try the "TERM" solution.



      You ssh to your Debian from some terminal (putty, solaris dterm, debain xterm, you-name-it), this termninal announce capabilities (which includes keys such as Backspace and Tab) via TERM environment variable.



      So, after ssh to unix host (it doesn't depend debian it or other host) set the TERM variable according to your terminal. Consider you're using bash as shell and vt100 as terminal:



      export TERM=vt100


      ps: TERM should be announced via ssh automagically, but in some circumstances this magic fails.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Aug 14 '12 at 14:56









      paulpaul

      1,137167




      1,137167













      • still doesn't work :(

        – gopi1410
        Aug 14 '12 at 17:49











      • What terminal are you using? And what the value of TERM you have tried?

        – paul
        Aug 15 '12 at 6:23











      • I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

        – gopi1410
        Aug 15 '12 at 12:30











      • Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

        – paul
        Aug 16 '12 at 4:13













      • Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

        – gopi1410
        Aug 16 '12 at 6:35



















      • still doesn't work :(

        – gopi1410
        Aug 14 '12 at 17:49











      • What terminal are you using? And what the value of TERM you have tried?

        – paul
        Aug 15 '12 at 6:23











      • I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

        – gopi1410
        Aug 15 '12 at 12:30











      • Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

        – paul
        Aug 16 '12 at 4:13













      • Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

        – gopi1410
        Aug 16 '12 at 6:35

















      still doesn't work :(

      – gopi1410
      Aug 14 '12 at 17:49





      still doesn't work :(

      – gopi1410
      Aug 14 '12 at 17:49













      What terminal are you using? And what the value of TERM you have tried?

      – paul
      Aug 15 '12 at 6:23





      What terminal are you using? And what the value of TERM you have tried?

      – paul
      Aug 15 '12 at 6:23













      I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

      – gopi1410
      Aug 15 '12 at 12:30





      I tried vt100. How do I get to know the value of TERM? I tried ssh from cygwin (in windows) to Debian. If there are problems with cygwin, I even tried it from ubuntu terminal, but same problem.

      – gopi1410
      Aug 15 '12 at 12:30













      Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

      – paul
      Aug 16 '12 at 4:13







      Not sure cygwin has good terminal emulation, as far as I know, cygwin just using regular windows console which lacks terminal emulation (may be wrong). From ubuntu all should works just fine. Something wrong with shell or termcap library on debian. Login from Ubuntu and give me output of commands: 1. echo $TERM 2. stty -a

      – paul
      Aug 16 '12 at 4:13















      Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

      – gopi1410
      Aug 16 '12 at 6:35





      Well it works fine from my ubuntu machine, wonder why I hadn't verified it before.($TERM was 'xterm' there). So the problem is with cygwin only. Well anyways problem solved if it works with ubuntu :)

      – gopi1410
      Aug 16 '12 at 6:35











      11














      This is because your default shell is sh, to use bash, just run bash from your shell.



      bash


      To set bash as your default shell:



      chsh -s /bin/bash 


      or



      sudo chsh -s /bin/bash yourusername





      share|improve this answer


























      • This one fixed it for me. Never even though to look at my login shell!

        – James Pack
        Jul 3 '17 at 17:19
















      11














      This is because your default shell is sh, to use bash, just run bash from your shell.



      bash


      To set bash as your default shell:



      chsh -s /bin/bash 


      or



      sudo chsh -s /bin/bash yourusername





      share|improve this answer


























      • This one fixed it for me. Never even though to look at my login shell!

        – James Pack
        Jul 3 '17 at 17:19














      11












      11








      11







      This is because your default shell is sh, to use bash, just run bash from your shell.



      bash


      To set bash as your default shell:



      chsh -s /bin/bash 


      or



      sudo chsh -s /bin/bash yourusername





      share|improve this answer















      This is because your default shell is sh, to use bash, just run bash from your shell.



      bash


      To set bash as your default shell:



      chsh -s /bin/bash 


      or



      sudo chsh -s /bin/bash yourusername






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited 18 mins ago

























      answered Jun 14 '16 at 10:08









      iceflameiceflame

      11115




      11115













      • This one fixed it for me. Never even though to look at my login shell!

        – James Pack
        Jul 3 '17 at 17:19



















      • This one fixed it for me. Never even though to look at my login shell!

        – James Pack
        Jul 3 '17 at 17:19

















      This one fixed it for me. Never even though to look at my login shell!

      – James Pack
      Jul 3 '17 at 17:19





      This one fixed it for me. Never even though to look at my login shell!

      – James Pack
      Jul 3 '17 at 17:19











      7














      Your shell may be set to /bin/sh instead of /bin/bash






      share|improve this answer





















      • 1





        Related to this answer: unix.stackexchange.com/questions/50542/…

        – Samuel
        Sep 3 '15 at 18:36






      • 1





        cyberciti.biz/faq/howto-set-bash-as-your-default-shell

        – teynon
        Dec 16 '15 at 2:52











      • This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

        – Jake
        Mar 28 '16 at 14:40
















      7














      Your shell may be set to /bin/sh instead of /bin/bash






      share|improve this answer





















      • 1





        Related to this answer: unix.stackexchange.com/questions/50542/…

        – Samuel
        Sep 3 '15 at 18:36






      • 1





        cyberciti.biz/faq/howto-set-bash-as-your-default-shell

        – teynon
        Dec 16 '15 at 2:52











      • This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

        – Jake
        Mar 28 '16 at 14:40














      7












      7








      7







      Your shell may be set to /bin/sh instead of /bin/bash






      share|improve this answer















      Your shell may be set to /bin/sh instead of /bin/bash







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 30 '13 at 5:03









      Anthon

      60.4k17102165




      60.4k17102165










      answered Jul 30 '13 at 4:45









      jm.jm.

      17113




      17113








      • 1





        Related to this answer: unix.stackexchange.com/questions/50542/…

        – Samuel
        Sep 3 '15 at 18:36






      • 1





        cyberciti.biz/faq/howto-set-bash-as-your-default-shell

        – teynon
        Dec 16 '15 at 2:52











      • This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

        – Jake
        Mar 28 '16 at 14:40














      • 1





        Related to this answer: unix.stackexchange.com/questions/50542/…

        – Samuel
        Sep 3 '15 at 18:36






      • 1





        cyberciti.biz/faq/howto-set-bash-as-your-default-shell

        – teynon
        Dec 16 '15 at 2:52











      • This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

        – Jake
        Mar 28 '16 at 14:40








      1




      1





      Related to this answer: unix.stackexchange.com/questions/50542/…

      – Samuel
      Sep 3 '15 at 18:36





      Related to this answer: unix.stackexchange.com/questions/50542/…

      – Samuel
      Sep 3 '15 at 18:36




      1




      1





      cyberciti.biz/faq/howto-set-bash-as-your-default-shell

      – teynon
      Dec 16 '15 at 2:52





      cyberciti.biz/faq/howto-set-bash-as-your-default-shell

      – teynon
      Dec 16 '15 at 2:52













      This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

      – Jake
      Mar 28 '16 at 14:40





      This would be more helpful if it explained a little more and how to change it, but it was the problem I had. Thanks @Tom for your link that fixed the issue for me.

      – Jake
      Mar 28 '16 at 14:40











      4














      I usually use this to fix any funky character output in my terminal. It resets all the special characters to their default values.



      stty sane


      From the stty man page:




      same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke, all special characters to their default values







      share|improve this answer
























      • Backspace is working but tab still fails.

        – Udo
        May 3 '17 at 7:12
















      4














      I usually use this to fix any funky character output in my terminal. It resets all the special characters to their default values.



      stty sane


      From the stty man page:




      same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke, all special characters to their default values







      share|improve this answer
























      • Backspace is working but tab still fails.

        – Udo
        May 3 '17 at 7:12














      4












      4








      4







      I usually use this to fix any funky character output in my terminal. It resets all the special characters to their default values.



      stty sane


      From the stty man page:




      same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke, all special characters to their default values







      share|improve this answer













      I usually use this to fix any funky character output in my terminal. It resets all the special characters to their default values.



      stty sane


      From the stty man page:




      same as cread -ignbrk brkint -inlcr -igncr icrnl -iutf8 -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke, all special characters to their default values








      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 1 '16 at 20:56









      David MoralesDavid Morales

      1412




      1412













      • Backspace is working but tab still fails.

        – Udo
        May 3 '17 at 7:12



















      • Backspace is working but tab still fails.

        – Udo
        May 3 '17 at 7:12

















      Backspace is working but tab still fails.

      – Udo
      May 3 '17 at 7:12





      Backspace is working but tab still fails.

      – Udo
      May 3 '17 at 7:12











      1














      on top of paul's answer, if you want to retain the ability to have colorful output, you can use xterm-88color



      echo 'export TERM=xterm-88color' >> ~/.bashrc
      source ~/.bashrc





      share|improve this answer




























        1














        on top of paul's answer, if you want to retain the ability to have colorful output, you can use xterm-88color



        echo 'export TERM=xterm-88color' >> ~/.bashrc
        source ~/.bashrc





        share|improve this answer


























          1












          1








          1







          on top of paul's answer, if you want to retain the ability to have colorful output, you can use xterm-88color



          echo 'export TERM=xterm-88color' >> ~/.bashrc
          source ~/.bashrc





          share|improve this answer













          on top of paul's answer, if you want to retain the ability to have colorful output, you can use xterm-88color



          echo 'export TERM=xterm-88color' >> ~/.bashrc
          source ~/.bashrc






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 10 '18 at 4:09









          beenotungbeenotung

          133




          133























              0














              # stty -a
              speed 38400 baud; rows 34; columns 134; line = 0;
              intr = ^C; quit = ^; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
              <undef>; swtch = <undef>; start = ^Q; stop = ^S;
              susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
              -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
              -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -
              iuclc -ixany imaxbel -iutf8
              opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
              isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
              echoke


              My home key prints a ^[[1~, as per @Derui Si's solution my backspace key is working fine not sure what to do for home key.






              share|improve this answer




























                0














                # stty -a
                speed 38400 baud; rows 34; columns 134; line = 0;
                intr = ^C; quit = ^; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
                <undef>; swtch = <undef>; start = ^Q; stop = ^S;
                susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
                -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
                -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -
                iuclc -ixany imaxbel -iutf8
                opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
                isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
                echoke


                My home key prints a ^[[1~, as per @Derui Si's solution my backspace key is working fine not sure what to do for home key.






                share|improve this answer


























                  0












                  0








                  0







                  # stty -a
                  speed 38400 baud; rows 34; columns 134; line = 0;
                  intr = ^C; quit = ^; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
                  <undef>; swtch = <undef>; start = ^Q; stop = ^S;
                  susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
                  -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
                  -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -
                  iuclc -ixany imaxbel -iutf8
                  opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
                  isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
                  echoke


                  My home key prints a ^[[1~, as per @Derui Si's solution my backspace key is working fine not sure what to do for home key.






                  share|improve this answer













                  # stty -a
                  speed 38400 baud; rows 34; columns 134; line = 0;
                  intr = ^C; quit = ^; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
                  <undef>; swtch = <undef>; start = ^Q; stop = ^S;
                  susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
                  -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
                  -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -
                  iuclc -ixany imaxbel -iutf8
                  opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
                  isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
                  echoke


                  My home key prints a ^[[1~, as per @Derui Si's solution my backspace key is working fine not sure what to do for home key.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 15 '18 at 19:39









                  AdityaAditya

                  62




                  62






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f43103%2fbackspace-tab-not-working-in-terminal-using-ssh%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      CARDNET

                      Boot-repair Failure: Unable to locate package grub-common:i386

                      Aws NAT - Aws IGW- Aws router