diff --git a/assets/etc/ssh/ssh_config.d/00-alg.conf b/assets/etc/ssh/ssh_config.d/00-alg.conf new file mode 100644 index 0000000..17d1de0 --- /dev/null +++ b/assets/etc/ssh/ssh_config.d/00-alg.conf @@ -0,0 +1,6 @@ +Host * + HashKnownHosts no + HostKeyAlgorithms +ssh-rsa,rsa-sha2-256 + PubkeyAcceptedAlgorithms +ssh-rsa,rsa-sha2-256 + IdentityFile ~/.ssh/id_ed25519 + IdentityFile ~/.ssh/id_rsa diff --git a/assets/etc/ssh/sshd_config.d/00-ca.conf b/assets/etc/ssh/sshd_config.d/00-ca.conf new file mode 100644 index 0000000..dd183ad --- /dev/null +++ b/assets/etc/ssh/sshd_config.d/00-ca.conf @@ -0,0 +1,3 @@ +PermitRootLogin prohibit-password +TrustedUserCAKeys /etc/ssh/ssh-ca.pub +RevokedKeys /etc/ssh/ssh-krl \ No newline at end of file diff --git a/configure.sh b/configure.sh index 30f4b61..18cad7c 100755 --- a/configure.sh +++ b/configure.sh @@ -14,23 +14,7 @@ configure(){ echo -e "APT::Install-Recommends "0"; APT::Install-Suggests "0";" | tee /etc/apt/apt.conf.d/01norecommend >/dev/null - cp "$AWD/assets/etc/ssh/ssh-ca.pub" /etc/ssh - cp "$AWD/assets/etc/ssh/ssh-krl" /etc/ssh - sed -i "s/.*PermitRootLogin.*/PermitRootLogin prohibit-password/g" /etc/ssh/sshd_config || true - sed -i "/.*TrustedUserCAKeys.*/d" /etc/ssh/sshd_config || true - sed -i "/.*RevokedKeys.*/d" /etc/ssh/sshd_config || true - echo "TrustedUserCAKeys /etc/ssh/ssh-ca.pub" | tee -a /etc/ssh/sshd_config >/dev/null || true - echo "RevokedKeys /etc/ssh/ssh-krl" | tee -a /etc/ssh/sshd_config >/dev/null || true - sed -i "s/.*Host \*.*/Host \*/g" /etc/ssh/ssh_config - sed -i "/.*HashKnownHosts.*/d" /etc/ssh/ssh_config - sed -i "/.*HostKeyAlgorithms.*/d" /etc/ssh/ssh_config - sed -i "/.*PubkeyAcceptedAlgorithms.*/d" /etc/ssh/ssh_config - sed -i "/.*IdentityFile.*/d" /etc/ssh/ssh_config - echo " HashKnownHosts no" | tee -a /etc/ssh/ssh_config >/dev/null - echo " HostKeyAlgorithms +ssh-rsa,rsa-sha2-256" | tee -a /etc/ssh/ssh_config >/dev/null - echo " PubkeyAcceptedAlgorithms +ssh-rsa,rsa-sha2-256" | tee -a /etc/ssh/ssh_config >/dev/null - echo " IdentityFile ~/.ssh/id_ed25519" | tee -a /etc/ssh/ssh_config >/dev/null - echo " IdentityFile ~/.ssh/id_rsa" | tee -a /etc/ssh/ssh_config >/dev/null + cp "$AWD/assets/etc/ssh" /etc -r sed -i "s/.*SystemMaxUse=.*/SystemMaxUse=500M/g" /etc/systemd/journald.conf sed -i "s/.*RuntimeMaxUse=.*/RuntimeMaxUse=500M/g" /etc/systemd/journald.conf