Skip to content

Commit d78df17

Browse files
committed
added line for backing up moduli file
1 parent c1e39ad commit d78df17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ It's recommended to use the [ssh-audit](https://github.com/jtesta/ssh-audit) scr
4343
Diffie-Hellman moduli used for `diffie-hellman-group-exchange-sha256` should be at lest 3072 bits long according to [Mozilla's OpenSSH server hardening guide](https://infosec.mozilla.org/guidelines/openssh#modern-openssh-67). This can be done with the following commands.
4444

4545
```shell
46+
# backup original moduli file
47+
cp /etc/ssh/moduli /etc/ssh/moduli.backup
48+
4649
# find lines with moduli >= 3071 bits and save them to moduli.tmp
4750
awk '$5 >= 3071' /etc/ssh/moduli > /etc/ssh/moduli.tmp
51+
4852
# overwrite original moduli file with the updated one
4953
mv /etc/ssh/moduli.tmp /etc/ssh/moduli
5054
```

0 commit comments

Comments
 (0)