All Products
Search
Document Center

:What do I do if an SSH connection to a Linux ECS instance becomes abnormal when SELinux is enabled?

Last Updated:Aug 01, 2024

This topic describes how to troubleshoot the issue that an SSH connection to a Linux Elastic Compute Service (ECS) instance becomes abnormal when SELinux is enabled.

Problem description

When you connect to a Linux ECS instance by using SSH, the following error message appears in the command output or secure log even after you enter the correct password:

Permission denied, please try again.
error: Could not get shadow information for root.

Cause

The SELinux service is enabled.

Solution

Temporarily or permanently disable the SELinux service to resolve the SSH connection exception. For more information, see Enable or disable SELinux.