Skip to content

Commit 18a56d9

Browse files
CookieCr2nkIceCodeNewk4yt3x
authored
Add Information Disclosure and use only secure HostKeys (#9)
* Add Information Disclosure and use only secure HostKeys * Update sshd_config Co-authored-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> * feat(sshd): made `DebianBanner` option commented by default Signed-off-by: k4yt3x <i@k4yt3x.com> --------- Signed-off-by: k4yt3x <i@k4yt3x.com> Co-authored-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Co-authored-by: k4yt3x <i@k4yt3x.com>
1 parent c313721 commit 18a56d9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

sshd_config

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# Author: K4YT3X
33
# Contributor: IceCodeNew
44
# Contributor: brxken128
5+
# Contributor: CookieCr2nk
56
# Date Created: October 5, 2020
6-
# Last Updated: February 12, 2024
7+
# Last Updated: May 6, 2024
78

89
# Licensed under the GNU General Public License Version 3 (GNU GPL v3),
910
# available at: https://www.gnu.org/licenses/gpl-3.0.txt
@@ -104,6 +105,11 @@ Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com
104105
HostKeyAlgorithms rsa-sha2-512,rsa-sha2-256,ssh-ed25519
105106
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
106107

108+
# only use host keys with secure HostKeyAlgorithms
109+
# omit the ECDSA key since it is only used in conjunction with the NIST P-curves
110+
HostKey /etc/ssh/ssh_host_ed25519_key
111+
#HostKey /etc/ssh/ssh_host_rsa_key
112+
107113
# short moduli should be deactivated before enabling the use of diffie-hellman-group-exchange-sha256
108114
# see this link for more details: https://github.com/k4yt3x/sshd_config#deactivating-short-diffie-hellman-moduli
109115
# AES-CTR and Chacha20-Poly1305 modes have been removed to mitigate the Terrapin attack
@@ -114,6 +120,11 @@ KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sh
114120

115121
########## Connection Preferences ##########
116122

123+
# Debian-based distributions only
124+
# hide the Debian banner to prevent information disclosure
125+
# (e.g., `SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u3`)
126+
#DebianBanner no
127+
117128
# number of client alive messages sent without client responding
118129
ClientAliveCountMax 2
119130

0 commit comments

Comments
 (0)