summaryrefslogtreecommitdiff
path: root/config-parabola-mgmt-ssh.PKGBUILD
blob: 7e2be5a7128f843906034c12e80c105f5e78f8cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
. ${BUILDFILE%/*}/common.sh
pkgver=20180826

package() {
preamble

depends=(openssh)

add-file -m755 usr/share/holo/files/10-"$pkgname"/etc/ssh/sshd_config.holoscript <<'EOF'
#!/bin/sh
{
	sed '
		/^#Port/             aPort 1863
		/^#PermitRootLogin/  aPermitRootLogin no
	'
	echo
	echo '## Crypto improvements from https://wiki.mozilla.org/Security/Guidelines/OpenSSH'
	echo '## Modern profile, 2017-10-27 revision'
	echo
	echo '# Different HostKey preference order, no dsa_key'
	echo 'HostKey /etc/ssh/ssh_host_ed25519_key'
	echo 'HostKey /etc/ssh/ssh_host_rsa_key'
	echo 'HostKey /etc/ssh/ssh_host_ecdsa_key'
	echo
	echo 'KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256'
	echo 'Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr'
	echo 'MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com'
} | awk '/^$/{ s=1 } /./&&!x[$0]++{ if(s){print ""} print; s=0 }'
EOF

add-unit etc/systemd/system/multi-user.target.wants/sshd.service

postamble
}