Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Gaurav_Pandya
Advisor

How to edit/modify weak ciphers for SSH server

Below are the steps to disable weak ciphers on an SSH server. This configuration is frequently flagged during vulnerability scans.

 

R81.10+ version

Log in to the command line on the Gaia OS.
Enter Clish mode.
View the currently enabled KEX algorithms using the command:
"show ssh server kex enabled"
Disable the weak algorithm:
"set ssh server kex diffie-hellman-group1-sha1 off"
Save the configuration permanently:
"save config"

R81 and lower versions

1. Connect to the command line on Gaia OS.
2. Log in to the Expert mode.
3. Back up the current /etc/ssh/sshd_config file:
cd /etc/ssh
cp sshd_config sshd_config_BCK1

4. Edit the current /etc/ssh/sshd_config file:

vi /etc/ssh/sshd_config


5. Set the required Key Exchange method as the value of the "KexAlgorithms" parameter.

Find:
KexAlgorithms +diffie-hellman-group1-sha1
KexAlgorithms +diffie-hellman-group-exchange-sha1

Replace with:

#KexAlgorithms +diffie-hellman-group1-sha1
#KexAlgorithms +diffie-hellman-group-exchange-sha1
KexAlgorithms +diffie-hellman-group16-sha512
KexAlgorithms +diffie-hellman-group14-sha256

6. Save the changes in the file and exit Vi editor.

7. Restart the SSH service:

service sshd restart

(1)
1 Reply
the_rock
MVP Diamond
MVP Diamond

Excellent stuff, thanks for that @Gaurav_Pandya 

Best,
Andy
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events