Update install.sh

main
trrgrnd 2024-08-06 08:45:42 +00:00
parent 7135cca7f2
commit d0f3503c12
1 changed files with 11 additions and 7 deletions

View File

@ -1,14 +1,18 @@
#!/usr/bin/bash #!/usr/bin/bash
echo "[ ipv6 turn off ]" print_ylw(){
echo -e "\033[33m$1\033[0m"
}
print_ylw "[ ipv6 turn off ]"
sysctl -w net.ipv6.conf.all.disable_ipv6=0 sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0 sysctl -w net.ipv6.conf.default.disable_ipv6=0
sysctl -p sysctl -p
echo "[ sshd_config backup ]" print_ylw "[ sshd_config backup ]"
cat /etc/ssh/sshd_config > /etc/ssh/sshd_config_BUP && cat /etc/ssh/sshd_config > /etc/ssh/sshd_config_BUP &&
echo "[ configuring sshd ]" print_ylw "[ configuring sshd ]"
cat << EOF > /etc/ssh/sshd_config cat << EOF > /etc/ssh/sshd_config
Include /etc/ssh/sshd_config.d/*.conf Include /etc/ssh/sshd_config.d/*.conf
@ -26,14 +30,14 @@ AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp /usr/lib/openssh/sftp-server
EOF EOF
echo "[ appending ssh-keys ]" print_ylw "[ appending ssh-keys ]"
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDAPCabE6gKZkksoYdCCclvqBwPLMHM7Wasi3OtzgYmfyJzCPy2twMBZ35HbmuXd0oUE6IBScosGwgs3+5EQ/21b5BUosdZy82DDGG8vXwY2oxqd0U3GzebLmks8TRvdnZ2KXyMlbM9tB5lxrT8kaCdNWtj3Zbipjj2U6LDfvl9J5qojW4F7sNuh3qQ5T7FJA0R/X3F2K3VVk+ZD0PXy1pIauXck3K7iHtTjjHmBw73Ym0d+cg8MEOY7Y+tU4s8f2dOHN9VOSFONoYw0tOxUzZwYGNplEj3xDFUTsbm5wpWd6rGF9ilAqAnwB5Uwbq39ThikKi72PwIFr1e4QIf1AIOdci+yfrezZ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RjoT4vxBPQ==" >> ~/.ssh/authorized_keys
echo "[ restart sshd ]" print_ylw "[ restart sshd ]"
systemctl restart sshd systemctl restart sshd
packages="curl git nmap tcpdump net-tools wireguard tmux mc" packages="curl git nmap tcpdump net-tools wireguard tmux mc"
echo "[ packages installation: $packages ]" print_ylw "[ packages installation: $packages ]"
apt install $packages apt install $packages
echo "[ DONE ]" print_ylw "[ DONE ]"