How to Enable SSH Service in Rescue Mode on CentOS/RockyLinux/AlmaLinux
boot from iso
On the very first screen, you will find an option like the below image, so simply select "Troubleshooting" and press enter.
Enable the SSH service by replacing the content of /etc/ssh/sshd_config with /etc/ssh/sshd_config.anaconda cp /etc/ssh/sshd_config.anaconda /etc/ssh/sshd_config
Add temporary IP ip addr add [ip_address] dev [interface]