diff options
Diffstat (limited to 'config-mgmt-ssh.PKGBUILD')
-rw-r--r-- | config-mgmt-ssh.PKGBUILD | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/config-mgmt-ssh.PKGBUILD b/config-mgmt-ssh.PKGBUILD new file mode 100644 index 0000000..2c2831a --- /dev/null +++ b/config-mgmt-ssh.PKGBUILD @@ -0,0 +1,33 @@ +. ${BUILDFILE%/*}/common.sh +pkgver=20170204.5 + +package() { +preamble + +depends=(openssh) + +add-file -m755 usr/share/holo/files/10-"$pkgname"/etc/ssh/sshd_config.holoscript <<EOF +#!/bin/sh +{ + sed ' + /^#Port/{ + aPort 22 + aPort 1863 + } + /^#PermitRootLogin/{ + aPermitRootLogin no + } + ' + echo + echo '## Crypto improvements' + echo '## https://stribika.github.io/2015/01/04/secure-secure-shell.html' + echo 'KexAlgorithms curve25519-sha256@libssh.org,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,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com' +} | awk '\$0==""||!x[\$0]++' +EOF + +add-unit etc/systemd/system/multi-user.target.wants/sshd.service + +postamble +} |