From 94d11f34eef4dd9b8b2bfb8b6d9295cd28bf96c9 Mon Sep 17 00:00:00 2001 From: ston1th Date: Sat, 4 Dec 2021 19:25:09 +0100 Subject: [PATCH] updated go --- build-go.sh | 4 +++- ssh-config.sh | 33 ++++++--------------------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/build-go.sh b/build-go.sh index d3ecf31..59a12bb 100755 --- a/build-go.sh +++ b/build-go.sh @@ -14,10 +14,12 @@ bootstrap="${install_dir}/bootstrap-${v14}" tgz14="${v14}.tar.gz" path_v14="${install_dir}/${tgz14}" -v="${1-1.17.1}" +v="${1-1.17.4}" case "${v}" in 1.16.7) new_sum="07502f16366fbc697b1b09b842d29116e6d6607c9dc42b1d7c54b96f528c7952";; 1.17.1) new_sum="670ce36e100669f9be572a1603858ce4a64eb4b21a31fa5cdefb778609c40337";; + 1.17.2) new_sum="022fe1f533432a305db705448f50f9a3ea369586dc32d07219b1bc7db1e01577";; + 1.17.4) new_sum="91736588a47917aaa424dfdf482d8efcb44403a768e7a947c272a98881053386";; *) errx "no hash found for version ${v}";; esac diff --git a/ssh-config.sh b/ssh-config.sh index 4d809e3..8ad7d32 100755 --- a/ssh-config.sh +++ b/ssh-config.sh @@ -9,30 +9,6 @@ read answer [ "${answer}" != "y" ] && exit 0 -ssh_moduli="/etc/ssh/moduli" -moduli="/etc/moduli" -if [ -f ${ssh_moduli} ]; then - echo "filtering safe primes" - awk '$5 > 2000' ${ssh_moduli} > /tmp/moduli - mv /tmp/moduli ${ssh_moduli} -elif [ -f ${moduli} ]; then - echo "filtering safe primes" - awk '$5 > 2000' ${moduli} > /tmp/moduli - mv /tmp/moduli ${moduli} -else - echo "generating safe primes" - echo "warning: this can take a long time (2h+)" - echo -n "continue? [n/Y] " - read answer - if [ "${answer}" == "n" ]; then - exit 0 - fi - ssh-keygen -G ${ssh_moduli}.all -b 4096 > /dev/null - ssh-keygen -T ${ssh_moduli}.safe -f ${ssh_moduli}.all > /dev/null - mv ${ssh_moduli}.safe ${ssh_moduli} - rm ${ssh_moduli}.all -fi - echo "cleaning ssh host keys" rm /etc/ssh/ssh_host_{ecdsa,dsa,dss}_key* 2>/dev/null [ ! -f /etc/ssh/ssh_host_ed25519_key ] && ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" > /dev/null @@ -45,9 +21,12 @@ echo "writing ssh config" cat < ${ssh_config} HostKey /etc/ssh/ssh_host_ed25519_key HostKey /etc/ssh/ssh_host_rsa_key -KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 -Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com -MACs umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com +HostKeyAlgorithms ssh-ed25519,rsa-sha2-512 +PubkeyAcceptedAlgorithms ssh-ed25519,rsa-sha2-512 +KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org +Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com +MACs hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com +Compression no PermitRootLogin no ChallengeResponseAuthentication no PasswordAuthentication no