ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
    • Linux
      • Basics
      • Apache
      • Control Panels
      • FTP
      • Magento
      • Miscellaneous
      • MySQL
      • NGINX
      • PHP
      • PHP-FPM
      • Setting up Websites
      • NFS
      • VPN
      • Percona
      • SSH
      • SSL
      • Git
      • Redis
      • Elasticsearch
      • MongoDB
      • Ncdu
    • VMware ESXi
    • Windows
  • Webcelerator
  • MyUKFast
  • Home >
  • Operating systems >
  • Linux >
  • SSH >
  • SSH Diffie-Hellman

SSH Diffie-Hellman¶

moduli of 2048 bits or greater¶

Take a copy of /etc/ssh/moduli and /etc/ssh/sshd_config file first

cp /etc/ssh/moduli /etc/ssh/moduli.backup
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup

Delete lines from /etc/ssh/moduli where the 5th column is less than 2000.

awk '$5 > 2000' /etc/ssh/moduli > /usr/src/moduli
mv "/usr/src/moduli" /etc/ssh/moduli

Diffie-Hellman¶

Add the following KexAlgorithms in /etc/ssh/sshd_config

KexAlgorithms ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256

Restart SSH service on the server¶

systemctl restart sshd

Next Article > SSL

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ