• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Backspace key and history don't work in chroot SSH Terminal

ESTUGO

Basic Pleskian
Server operating system version
AlmaLinux 8.9
Plesk version and microupdate number
18.0.59 Update #2
Hi,
we have two issues with the SSH Terminal extension with chrooted ssh access. In the chroot shell Backspace is not working. Instead of deleting, it adds a space. And the history got a problem too. When I press arrow up once it shows correctly the last entry, but on a second press it just concatenates the entries. So for example if my last commands were ls, cd, mc and I press arrow up three times it would print “lscdmc” instead of mc.

I already tried this without effect: Issue - Backspace key doesn't work when logged in chroot account

Has anyone an idea what to do, to fix this?
 
I have solved it this way in Almalinux:


**Logging in as root:**

1. **Download the script**:
Start by downloading the necessary script with the following command:

Bash:
curl -o update-chroot.sh https://raw.githubusercontent.com/plesk/kb-scripts/master/update-chroot/update-chroot.sh


2. **Make the script executable**:
Change the permissions of the downloaded script to make it executable by running:

Bash:
chmod +x update-chroot.sh


**Execution steps:**

3. **Copy terminfo directory**:
Copy the terminfo directory to the chroot environment to ensure the terminal type information is available:

Bash:
cp -a /usr/share/terminfo/ /var/www/vhosts/chroot/usr/share/


4. **Copy the inputrc file**:
The inputrc file contains settings for the readline library, which handles input for many command-line programs. Copy it with:

Bash:
cp /etc/inputrc /var/www/vhosts/chroot/etc/


5. **Apply the changes**:
Finally, apply the changes to ensure the chroot environment is updated. Execute the script by running:

Bash:
./update-chroot.sh --apply all
 
Back
Top