Hardened SSH config
This commit is contained in:
parent
6bef7d8ad8
commit
5b30c056ed
@ -20,7 +20,4 @@ chown -R ${USER}:${USER} /config
|
|||||||
|
|
||||||
set -xv
|
set -xv
|
||||||
|
|
||||||
/usr/sbin/sshd -D -e -4 \
|
/usr/sbin/sshd -D -e -4
|
||||||
-o "HostKey=${CONFIG_DIR}/ssh_host_rsa_key" \
|
|
||||||
-o "HostKey=${CONFIG_DIR}/ssh_host_ed25519_key" \
|
|
||||||
-o "Port=${PORT}" \
|
|
||||||
|
10
sshd_config
10
sshd_config
@ -1,7 +1,17 @@
|
|||||||
|
PermitRootLogin no
|
||||||
|
ChallengeResponseAuthentication no
|
||||||
|
PasswordAuthentication no
|
||||||
|
AuthenticationMethods publickey
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
AllowUsers bastion
|
||||||
|
UsePAM no
|
||||||
PermitTTY no
|
PermitTTY no
|
||||||
X11Forwarding no
|
X11Forwarding no
|
||||||
PermitTunnel no
|
PermitTunnel no
|
||||||
GatewayPorts no
|
GatewayPorts no
|
||||||
|
HostKey /config/ssh_host_ed25519_key
|
||||||
|
HostKey /config/ssh_host_rsa_key
|
||||||
|
Port 2222
|
||||||
ForceCommand /sbin/nologin
|
ForceCommand /sbin/nologin
|
||||||
Match User bastion
|
Match User bastion
|
||||||
AllowTcpForwarding yes
|
AllowTcpForwarding yes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user