How to Disable TCP Port Forwarding of OpenSSH Server on AlmaLinux 8

a) Configuring The OpenSSH Server

Open the /etc/ssh/sshd_config file on your favorite text editor with superuser privileges. Find the AllowTcpForwarding parameter and change its value to no.
AllowTcpForwarding no

b) Restarting The OpenSSH Server

After all, restart sshd service.
sudo systemctl restart sshd.service
It should give the SSH server a graceful restart.


Abdullah As-Sadeed

Abdullah As-Sadeed