Elastic Cloud Linux system enters single-user mode via the console to reset SSH login password (applicable to CentOS 8).
Published: 2022-06-10
For centos6 system please refer to: https://www.west.cn/faq/list.asp?unid=756
For centos7 system please refer to:https://www.west.cn/faq/list.asp?unid=979
Via Management Center - Business Management - Server Management - Management, as shown in the image:

Then click "System Management" -- "WEB Console", as shown in the image:

Then, as shown in the image, click Hot Restart Server:

After clicking, the system will restart. At this time, quickly press the ESC key to enter the kernel interface, select the first one and press the letter e, as shown in the image below:
2: Modify boot permission configuration
Change ro (read-only) to: rw init=/sysroot/bin/bash
3: Press "ctrl+x" to enter emergency mode
4: Change password
Enter chroot /sysroot/
Then enter passwd to set a new password (it is recommended to set it in plain text)
After the modification is complete, run the command touch /.autorelabel to refresh and take effect.
Example:
chroot /sysroot/
echo 'xxxx' | passwd --stdin root (xxxx replace with the new password to be changed)
touch /.autorelabel
5: Exit and restart
exit
reboot
