added line to start openssh server after stopping, and update for Hardened OpenSSH Server v9.4 (version 2)

William Davis 2023-12-28 02:34:04 -05:00
parent 84f3943ea1
commit bb64df98e0

@ -24,7 +24,7 @@ sed -i .orig 's/^\#HostKey \/etc\/ssh\/ssh_host_ed25519_key/HostKey \/etc\/ssh\/
echo '
# Restrict key exchange, cipher, and MAC algorithms, as per sshaudit.com
# hardening guide.
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com
HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256' > /etc/ssh/sshd_config.d/99_hardening.conf
@ -32,6 +32,7 @@ HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256' > /etc/ssh/sshd_config.
5. Restart OpenSSH server
```
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
```
## Validated versions