The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Jailshell SSH - Vi/Vim cursor keys giving A B C D

Discussion in 'General Discussion' started by santrix, Dec 18, 2011.

  1. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    When I log in as root, using /bin/bash then vi seems to work prefectly fine in all respects. When a normal cpanel users SSH's in (jailshell) then they find that vi works fine apart from inInsert mode, where the cursor keys give A B C D, and the backspace doesn't actually delete the character in the display.

    I have repeated this myself by logging into their account.

    I have read dozens of articles on this similar issue but none of the fixes have worked, as the problems are all slightly different in nature.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Can you please take a screen shot of what you are seeing when you try to edit in vi/vim on a shell user's account that isn't properly working?

    Next, could you provide the contents of the existing /home/username/.bash_profile and /home/username/.bashrc for one of those users?
     
  3. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Untitled-1.jpg

    This is the result of running vi from a jailshell user account (from any of our cpanel servers), going into insert mode, pressing the up, right, down, left cursor keys in sequence, and then typing the words "up right down left"

    This is from a mac terminal, but the same from win/putty

    local environment TERM=xterm-color

    on the server, the user's .bash_profile :

    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    # User specific environment and startup programs

    PATH=$PATH:$HOME/bin

    export PATH


    And .bashrc :

    # .bashrc

    # Source global definitions
    if [ -f /etc/bashrc ]; then
    . /etc/bashrc
    fi

    # User specific aliases and functions
     
Loading...

Share This Page