This commit is contained in:
Daniel Langbein 2021-07-02 11:55:14 +02:00
parent 5706727e8c
commit cea65f6f67
2 changed files with 11 additions and 6 deletions

View File

@ -2,7 +2,7 @@
_pkgname=ssh
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.6
pkgver=0.0.7
pkgrel=1
pkgdesc="ssh with configuration"
arch=('any')

View File

@ -8,11 +8,16 @@ stdin=$(cat)
# assertions
echo "$stdin" | grep --quiet '^UsePAM yes$'
#
echo "$stdin" | grep --quiet '^#PermitRootLogin\s*$'
echo "$stdin" | grep --quiet '^#PubkeyAuthentication\s*$'
echo "$stdin" | grep --quiet '^#PasswordAuthentication\s*$'
echo "$stdin" | grep --quiet '^#PermitEmptyPasswords\s*$'
echo "$stdin" | grep --quiet '^#X11Forwarding\s*$'
echo "$stdin" | grep --quiet '^#PermitRootLogin\s*$'
! echo "$stdin" | grep --quiet '^PermitRootLogin\s*$'
echo "$stdin" | grep --quiet '^#PubkeyAuthentication\s*$'
! echo "$stdin" | grep --quiet '^PubkeyAuthentication\s*$'
echo "$stdin" | grep --quiet '^#PasswordAuthentication\s*$'
! echo "$stdin" | grep --quiet '^PasswordAuthentication\s*$'
echo "$stdin" | grep --quiet '^#PermitEmptyPasswords\s*$'
! echo "$stdin" | grep --quiet '^PermitEmptyPasswords\s*$'
echo "$stdin" | grep --quiet '^#X11Forwarding\s*$'
! echo "$stdin" | grep --quiet '^X11Forwarding\s*$'
sed '
s|^#PermitRootLogin\s*$|PermitRootLogin no|;