Rocky Linux / SSH, Wi-Fi, Password Policy, and Text Installation Notes

Changing a Rocky Linux SSH port requires coordinated SELinux, firewall, and sshd configuration. These notes cover preserving access, Wi-Fi tools, password-quality policy, and text-mode installation as separate administration tasks. For the related conditions and procedure, see How to Configure Root SSH Login on Rocky Linux Safely. For the related conditions and procedure, see How to Configure SELinux Modes on Rocky Linux. For the related conditions and procedure, see How to Manage firewalld on Rocky Linux: Zones, Services, and Ports.

Prepare access before changing the SSH port

cat /etc/rocky-release
sudo sshd -T | grep -E "^(port|listenaddress) "
sudo firewall-cmd --get-active-zones
getenforce

Keep the current connection and console available, and back up sshd configuration. Confirm that the example port 50022 is unused. Replace the example public zone with the zone governing the real interface or source. If firewalld is not used, inspect the active firewall and cloud security rules.

Prepare SELinux and firewall permissions first

sudo semanage port -l | grep "^ssh_port_t"
sudo ss -lntp

Check the policycoreutils-python-utils package if semanage is missing. Use the add command below only when SELinux is enabled and 50022 is an unregistered new port. If it belongs to another type, investigate the existing service rather than blindly reassigning it.

sudo semanage port -a -t ssh_port_t -p tcp 50022
sudo firewall-cmd --zone=public --add-port=50022/tcp

Do not remove the old SSH allowance at this stage. If administration is restricted by source network, carry that restriction over to the new port instead of using a broad port allowance.

Apply sshd settings and test a new connection

Port 50022

Edit the effective sshd configuration, accounting for includes and Match rules. Do not assume that adding a duplicate setting later will override the first obtained value.

sudo sshd -t && sudo systemctl reload sshd
sudo ss -lntp

From another terminal, test ssh -p 50022 user@server and the required sudo operations. After success, add this allowance to permanent configuration and inspect both runtime and permanent rules. Consider removal of the old port rule only after access and recovery have been verified.

sudo firewall-cmd --permanent --zone=public --add-port=50022/tcp
sudo firewall-cmd --zone=public --list-ports
sudo firewall-cmd --permanent --zone=public --list-ports

If the new connection fails, restore only this SSH change through the existing session or console, validate it with sshd -t, and reload. Confirm access on the original port before removing only the firewall and SELinux entries added for this change. Do not persist or clear unrelated runtime rules.

OpenSSH configuration manual

Prepare Wi-Fi tools

nmcli device status
rpm -q NetworkManager-wifi
sudo dnf install NetworkManager-wifi

Also check the device, driver, firmware, radio blocking, and connection profile. Installing a package in a VM does not create physical Wi-Fi hardware. Prepare console recovery before changing a remote server’s active connection.

Inspect and adjust password-quality policy

authselect current
sudo grep -R "pam_pwquality" /etc/pam.d/
sudo grep -R -E "^[[:space:]]*(minlen|enforcing|enforce_for_root)" /etc/security/pwquality.conf /etc/security/pwquality.conf.d/ 2>/dev/null

First verify that the active PAM policy uses pwquality.conf and its drop-ins. Read the installed man pwquality.conf for option semantics, back up the configuration, and then edit it. Commented lines are not active settings; minlen combined with character-class credits may not equal a simple minimum character count. Do not overwrite PAM files managed by authselect.

Checks normally run when passwords are set or changed; changing policy does not automatically replace every existing password. Test acceptance and rejection with a separate lab account. Restore only the changed settings on failure and retest. Inspect enforce_for_root together with the effective PAM configuration for root enforcement.

Read the text-mode installer screens

These existing examples show a Rocky Linux 10.1 VM booting with UEFI. Keys, screens, and option numbers vary with the image and firmware. In the UEFI GRUB entry, use e to edit the kernel line, append inst.text, and boot with Ctrl+X or F10. For BIOS media, follow its displayed edit key. Verify the disk, capacity, and data to preserve before committing storage changes.

Select the installation entry in the UEFI boot menuAppend inst.text to the kernel command lineRead the text-mode selection promptInspect the text installer configuration menu

Read the current choices rather than treating a number such as 2 as universal. Text installers may expose different capabilities from graphical installers; verify that the required storage and encryption choices are supported.