update
This commit is contained in:
parent
dc9cfb9083
commit
6fdb4c8411
6
assets/etc/ssh/ssh_config.d/00-alg.conf
Normal file
6
assets/etc/ssh/ssh_config.d/00-alg.conf
Normal file
@ -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
|
||||
3
assets/etc/ssh/sshd_config.d/00-ca.conf
Normal file
3
assets/etc/ssh/sshd_config.d/00-ca.conf
Normal file
@ -0,0 +1,3 @@
|
||||
PermitRootLogin prohibit-password
|
||||
TrustedUserCAKeys /etc/ssh/ssh-ca.pub
|
||||
RevokedKeys /etc/ssh/ssh-krl
|
||||
18
configure.sh
18
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user