- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026
Inception is On!
What's New in R82.10?
10 December @ 5pm CET / 11am ET
Improve Your Security Posture with
Threat Prevention and Policy Insights
Overlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hello everyone! We encountered a strange situation. We wanted to disable the diffie-hellman-group14-sha1 cipher. When we checked if it was active using the command # sshd -T -C 'user=<username>,addr=::1' | grep kexalgorithms, it was displayed in the output.
We decided to disable it, according to https://support.checkpoint.com/results/sk/sk172189. We have version 81.10 and according to the instructions, we started editing the file /etc/ssh/templates/sshd_config.templ.
However, we found that this configuration file does not have the diffie-hellman-group14-sha1 cipher in the list of ciphers. We added it to the file manually and put the "-" symbol so that the appearance matches the instructions from the article.
However, after this, diffie-hellman-group14-sha1 was still present in the output of # sshd -T -C 'user=<username>,addr=::1' | grep kexalgorithms.
Does anyone know why this cipher was not in the configuration file, but was shown in the output of # sshd -T -C? How can we properly disable this cipher?
There are no blades enabled on the gateway except fw.
I would be grateful for any help!
The problem was solved by explicitly specifying only the required algorithms in the configuration file.
That is, instead of
-diffie-...
it was necessary to write, for example,
KexAlgorithms diffie-hellman-group14-sha256,diffie-hellman-group16-sha512
Apologies, did not go through all this myself, but maybe verify if what its listed below from AI copilot is what was done.
Andy
***********************
To disable thediffie-hellman-group14-sha1Key Exchange (KEX) method for SSH on Check Point Gaia OS, follow the appropriate procedure based on your Gaia OS version.
show ssh server kex enabled
set ssh server kex diffie-hellman-group14-sha1 off
save config
service sshd restart
/etc/ssh/templates/sshd_config.templfile:
cp -v /etc/ssh/templates/sshd_config.templ{,_BKP}
/etc/ssh/templates/sshd_config.templfile:
vi /etc/ssh/templates/sshd_config.templ
+to-for the KexAlgorithms in question:
KexAlgorithms -diffie-hellman-group14-sha1
/bin/sshd_template_xlate < /config/active
service sshd restart
sshd -T -C 'user=<username>,addr=::1' | grep kexalgorithms
Example for the username "admin":
sshd -T -C 'user=admin,addr=::1' | grep kexalgorithms
/etc/ssh/sshd_configfile:
cp -v /etc/ssh/sshd_config{,_BKP}
/etc/ssh/sshd_configfile:
vi /etc/ssh/sshd_config
KexAlgorithmsparameter:
KexAlgorithms -diffie-hellman-group14-sha1
service sshd restart
Please make sure to follow the below mandatory guidelines, to minimize the potential impact of this plan as possible:
If you encounter any issues or need further assistance, please refer to the relevant documentation or open a ticket in the Check Point Support Center at support.checkpoint.com.
Thank you very much for the answer! This is exactly what we did, this text corresponds to the instruction from sk172189, according to which we tried to make changes.
However, what we saw did not look like the instruction. We did not find a line containing diffie-hellman-group14-sha1 in the file /etc/ssh/templates/sshd_config.templ, so we added the line KexAlgorithms -diffie-hellman-group14-sha1 manually.
At the same time, in the output of the command sshd -T -C 'user=<username>,addr=::1' | grep kexalgorithms, this cipher was displayed both before and after the changes.
Do you know the reason why this happens?
On R82 here's what I did for SSH:
set ssh server cipher 3des-cbc off
set ssh server cipher aes128-cbc off
set ssh server cipher aes128-ctr off
set ssh server cipher aes128-gcm@openssh.com on
set ssh server cipher aes192-cbc off
set ssh server cipher aes192-ctr off
set ssh server cipher aes256-cbc off
set ssh server cipher aes256-ctr off
set ssh server cipher aes256-gcm@openssh.com on
set ssh server cipher chacha20-poly1305@openssh.com off
set ssh server cipher rijndael-cbc@lysator.liu.se off
set ssh server mac hmac-md5-96-etm@openssh.com off
set ssh server mac hmac-md5-etm@openssh.com off
set ssh server mac hmac-sha1 off
set ssh server mac hmac-sha1-96-etm@openssh.com off
set ssh server mac hmac-sha1-etm@openssh.com off
set ssh server mac hmac-sha2-256 on
set ssh server mac hmac-sha2-256-etm@openssh.com on
set ssh server mac hmac-sha2-512 on
set ssh server mac hmac-sha2-512-etm@openssh.com on
set ssh server mac umac-64-etm@openssh.com off
set ssh server mac umac-64@openssh.com off
set ssh server mac umac-128-etm@openssh.com off
set ssh server mac umac-128@openssh.com off
set ssh server kex curve25519-sha256 on
set ssh server kex curve25519-sha256@libssh.org on
set ssh server kex diffie-hellman-group1-sha1 off
set ssh server kex diffie-hellman-group14-sha1 off
set ssh server kex diffie-hellman-group14-sha256 on
set ssh server kex diffie-hellman-group16-sha512 on
set ssh server kex diffie-hellman-group18-sha512 on
set ssh server kex diffie-hellman-group-exchange-sha1 off
set ssh server kex diffie-hellman-group-exchange-sha256 on
set ssh server kex ecdh-sha2-nistp256 on
set ssh server kex ecdh-sha2-nistp384 on
set ssh server kex ecdh-sha2-nistp521 on
set ssh server public-key ecdsa-sha2-nistp256 on
set ssh server public-key ecdsa-sha2-nistp256-cert-v01@openssh.com on
set ssh server public-key ecdsa-sha2-nistp384 on
set ssh server public-key ecdsa-sha2-nistp384-cert-v01@openssh.com on
set ssh server public-key ecdsa-sha2-nistp521 on
set ssh server public-key ecdsa-sha2-nistp521-cert-v01@openssh.com on
set ssh server public-key rsa-sha2-256 on
set ssh server public-key rsa-sha2-256-cert-v01@openssh.com on
set ssh server public-key rsa-sha2-512 on
set ssh server public-key rsa-sha2-512-cert-v01@openssh.com on
set ssh server public-key ssh-dss off
set ssh server public-key ssh-dss-cert-v01@openssh.com off
set ssh server public-key ssh-ed25519 on
set ssh server public-key ssh-ed25519-cert-v01@openssh.com on
set ssh server public-key ssh-rsa on
set ssh server public-key ssh-rsa-cert-v01@openssh.com on
The result reported is:
> show ssh server cipher enabled
--------------------------------
enabled cipher:
--------------------------------
aes128-gcm@openssh.com
aes256-gcm@openssh.com
> show ssh server kex enabled
--------------------------------
enabled kex:
--------------------------------
curve25519-sha256
curve25519-sha256@libssh.org
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
> show ssh server mac enabled
--------------------------------
enabled mac:
--------------------------------
hmac-sha2-256
hmac-sha2-256-etm@openssh.com
hmac-sha2-512
hmac-sha2-512-etm@openssh.com
> show ssh server public-key enabled
--------------------------------
enabled public-key:
--------------------------------
ecdsa-sha2-nistp256
ecdsa-sha2-nistp256-cert-v01@openssh.com
ecdsa-sha2-nistp384
ecdsa-sha2-nistp384-cert-v01@openssh.com
ecdsa-sha2-nistp521
ecdsa-sha2-nistp521-cert-v01@openssh.com
rsa-sha2-256
rsa-sha2-256-cert-v01@openssh.com
rsa-sha2-512
rsa-sha2-512-cert-v01@openssh.com
ssh-ed25519
ssh-ed25519-cert-v01@openssh.com
ssh-rsa
ssh-rsa-cert-v01@openssh.com
Not sure if there are any further recommendations to lock down SSH.
The problem was solved by explicitly specifying only the required algorithms in the configuration file.
That is, instead of
-diffie-...
it was necessary to write, for example,
KexAlgorithms diffie-hellman-group14-sha256,diffie-hellman-group16-sha512
Glad you got it working. I tested below what I sent you yesterday and worked in both R81.20 and R82, no issues.
Andy
show ssh server kex enabled
set ssh server kex diffie-hellman-group14-sha1 off
save config
service sshd restart
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 15 | |
| 12 | |
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 |
Wed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasWed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY