Skip to content
This repository has been archived by the owner on Jun 21, 2018. It is now read-only.

Commit

Permalink
Harden sshd_config
Browse files Browse the repository at this point in the history
- use `UsePrivilegeSeparation sandbox`, which is more strict than `UsePrivilegeSeparation yes` during pre-auth;
- allow using ed25519 for host keys;
- remove a duplicate instance of `PasswordAuthentication yes`.
- in .gitignore, replaces the enumeration of pubkey files with a wildcard:
  this is less error-prone than enumerating all key types in use.
  • Loading branch information
KellerFuchs committed Sep 18, 2015
1 parent 93a0a61 commit 5d92e0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ group.org
ssl/certs
ssl/private
ssh/ssh_host_*_key
ssh/ssh_host_*_key.pub
*-
*.gz
alternatives
Expand All @@ -75,9 +76,6 @@ hosts
resolv.conf
resolvconf/resolv.conf.d/original
udev/rules.d/70-persistent-net.rules
ssh/ssh_host_dsa_key.pub
ssh/ssh_host_ecdsa_key.pub
ssh/ssh_host_rsa_key.pub
hostname
machine-id
provisor.ini
Expand Down
5 changes: 2 additions & 3 deletions ssh/sshd_config
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
UsePrivilegeSeparation sandbox

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
Expand Down Expand Up @@ -89,4 +89,3 @@ Subsystem sftp /usr/lib/openssh/sftp-server
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
PasswordAuthentication yes

0 comments on commit 5d92e0b

Please sign in to comment.