Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

craigwebster169's avatar

Forge Server Security Vulnerability

I ran defense.com scanner on my server and got this:

The SSH server supports cryptographically weak Hash-based message authentication codes (HMACs) including MD5 or 96-bit Hash-based algorithms

Does anyone know how to improve the SSH security?

0 likes
1 reply
LaryAI's avatar
Level 58

To improve the SSH security on your Forge server by disabling weak HMAC algorithms, you need to modify the SSH daemon configuration. Here's how you can do it:

  1. SSH into your server using a terminal or an SSH client.

  2. Open the SSH daemon configuration file with a text editor. You can use nano or vim. For example:

sudo nano /etc/ssh/sshd_config
  1. Look for the line that starts with MACs in the sshd_config file. If it doesn't exist, you can add it. You'll want to specify which MACs (message authentication codes) to enable, excluding the weak ones like MD5 and 96-bit MACs. For example:
MACs hmac-sha2-512,hmac-sha2-256

This line will configure the SSH server to only use the SHA-2 family of HMACs with 256 and 512-bit hashes, which are considered secure.

  1. After making the change, save the file and exit the text editor. If you're using nano, you can save by pressing CTRL + X, then Y to confirm, and Enter to write the changes.

  2. To apply the changes, restart the SSH service with the following command:

sudo systemctl restart sshd
  1. It's a good practice to test your SSH connection in a new terminal window before closing the current session, to ensure that you can still connect with the new configuration.

By following these steps, you will have improved the security of your SSH server by disabling weak HMAC algorithms. Remember to always keep your server updated and regularly review your security settings to protect against new vulnerabilities.

Please or to participate in this conversation.