In SSH remote connectionConnectFor Linux instances, Even if the password is entered correctly,On the command line orThe following error message is also displayed in secure logs.
Permission denied, please try again.
error: Could not get shadow infromation for root.
This problem is usually caused by the SELinux service enabled.
You can choose to temporarily or permanently disable SELinux to solve SSH connection exceptions based on the on-site environment requirements.
Check the SELinux service status
- PassManagement terminalLog on to the Linux instance and run the following command to check the current SELinux Service Status.
/usr/sbin/sestatus -vA similar output is displayed.
SELinux status: enabled
SELinux statusThe parameter is
Temporarily disable SELinux
Log on to the Linux instance and run the following command to temporarily disable SELinux.
Note:You can modify the SELinux service status in real time without restarting the system or instance.
Disable SELinux permanently
Log on to the Linux instance and run the following command to disable SELinux permanently.
Note:The SELinux service status can only be changed permanently after the system or instance is restarted.
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Note:This command is only applicable to the current SELinux service