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

santrix

Well-Known Member
Nov 30, 2008
229
4
68
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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?
 

santrix

Well-Known Member
Nov 30, 2008
229
4
68
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