commit b1b730cd43b2cfec28efe4155aaa447d3395dd96 Author: Glauber Ferreira Date: Sat Aug 20 22:11:41 2022 -0300 primeiro esforço diff --git a/packages_alpine.sh b/packages_alpine.sh new file mode 100644 index 0000000..dba8c9e --- /dev/null +++ b/packages_alpine.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +apk update +apk add python3 curl wget nano vim openssh-server openssh-sftp-server bash procps screen socat htop +sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config +mkdir -p /root/.ssh +echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8tBRBfbN/GZZt88zn/5rUu7DD78winJ2anrq2Ai3lrH8zq27bqsXw7/dXszsmtcrQ3JIxZIVDJ1hH1dHTZePdWxPB6QsmqTCvi+k058c+HMyym7m4biMfOefJy+peSFuRnyty2+/ZrzG8z1iX/JaNYsmkk8ZutrVCB6MRUwOto0S5W+TzgDGKCAIa8Ci96zq3SC3+6BSBWXgboMQOOQmfxxVZ9y9IMJVx4InChLgnMyIUh9DzGnFM4Lt81lPxPsX1xygKSKZAGxHxZwhb62faEJkDNbYT+ShIMZ+rkBvf36eU++3WswgU3/m+qn0VNX1OGI0ohw/eDyA+6lOrXLWq7g3ucbfJTjukohTMRbNyfOhuuFaaRe6lmFeDpaXM8kojDtdGmcHhmiGd89ptFoY3S7xShyrv8QmUJAw8w8PnGtX/PiD0KuKN85WC/cob4FrmPqzwK4dx//0diax3bSWISEotiAFUubNzrDbWjLysG4rz4pKRQLw+aLrycB6A72LRvV1Nwg731KhXjhaG/+eXkkZpKMIMtLvHr1lNtOQKiV6pRtqmOearjpOfxUHL5TAsrCrOTDa6urbVhNSpXIEYLrb9mA+kZRvvci3oqwzYSzGdj+J8kl79VKarOurJKaM8SMczuyIVoscio46L6Y//cWeaoyESkUM/k1pYsao0sQ== alphard@alphard-Z97X-Gaming-3" > /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys +chmod 700 /root/.ssh +passwd -u root +/etc/init.d/sshd restart +rc-update add sshd +wget -O /usr/local/bin/neofetch "https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch" +chmod +x /usr/local/bin/neofetch +echo "neofetch --config /etc/neofetch.conf" > /etc/profile.d/motd.sh +echo "" > /etc/motd diff --git a/packages_centos.sh b/packages_centos.sh new file mode 100644 index 0000000..1f690c8 --- /dev/null +++ b/packages_centos.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e +yum install -y python3 curl wget nano vim openssh-server screen socat htop gnupg +sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config +mkdir -p /root/.ssh +echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8tBRBfbN/GZZt88zn/5rUu7DD78winJ2anrq2Ai3lrH8zq27bqsXw7/dXszsmtcrQ3JIxZIVDJ1hH1dHTZePdWxPB6QsmqTCvi+k058c+HMyym7m4biMfOefJy+peSFuRnyty2+/ZrzG8z1iX/JaNYsmkk8ZutrVCB6MRUwOto0S5W+TzgDGKCAIa8Ci96zq3SC3+6BSBWXgboMQOOQmfxxVZ9y9IMJVx4InChLgnMyIUh9DzGnFM4Lt81lPxPsX1xygKSKZAGxHxZwhb62faEJkDNbYT+ShIMZ+rkBvf36eU++3WswgU3/m+qn0VNX1OGI0ohw/eDyA+6lOrXLWq7g3ucbfJTjukohTMRbNyfOhuuFaaRe6lmFeDpaXM8kojDtdGmcHhmiGd89ptFoY3S7xShyrv8QmUJAw8w8PnGtX/PiD0KuKN85WC/cob4FrmPqzwK4dx//0diax3bSWISEotiAFUubNzrDbWjLysG4rz4pKRQLw+aLrycB6A72LRvV1Nwg731KhXjhaG/+eXkkZpKMIMtLvHr1lNtOQKiV6pRtqmOearjpOfxUHL5TAsrCrOTDa6urbVhNSpXIEYLrb9mA+kZRvvci3oqwzYSzGdj+J8kl79VKarOurJKaM8SMczuyIVoscio46L6Y//cWeaoyESkUM/k1pYsao0sQ== alphard@alphard-Z97X-Gaming-3" > /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys +chmod 700 /root/.ssh +systemctl restart sshd +systemctl enable sshd +wget -O /usr/local/bin/neofetch "https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch" +chmod +x /usr/local/bin/neofetch +echo "neofetch --config /etc/neofetch.conf" > /etc/profile.d/motd.sh +echo "" > /etc/motd diff --git a/packages_debian.sh b/packages_debian.sh new file mode 100644 index 0000000..98fcf51 --- /dev/null +++ b/packages_debian.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +apt update +apt install -y python3 curl wget nano vim software-properties-common openssh-server screen socat htop gnupg apt-transport-https +sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config +mkdir -p /root/.ssh +echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8tBRBfbN/GZZt88zn/5rUu7DD78winJ2anrq2Ai3lrH8zq27bqsXw7/dXszsmtcrQ3JIxZIVDJ1hH1dHTZePdWxPB6QsmqTCvi+k058c+HMyym7m4biMfOefJy+peSFuRnyty2+/ZrzG8z1iX/JaNYsmkk8ZutrVCB6MRUwOto0S5W+TzgDGKCAIa8Ci96zq3SC3+6BSBWXgboMQOOQmfxxVZ9y9IMJVx4InChLgnMyIUh9DzGnFM4Lt81lPxPsX1xygKSKZAGxHxZwhb62faEJkDNbYT+ShIMZ+rkBvf36eU++3WswgU3/m+qn0VNX1OGI0ohw/eDyA+6lOrXLWq7g3ucbfJTjukohTMRbNyfOhuuFaaRe6lmFeDpaXM8kojDtdGmcHhmiGd89ptFoY3S7xShyrv8QmUJAw8w8PnGtX/PiD0KuKN85WC/cob4FrmPqzwK4dx//0diax3bSWISEotiAFUubNzrDbWjLysG4rz4pKRQLw+aLrycB6A72LRvV1Nwg731KhXjhaG/+eXkkZpKMIMtLvHr1lNtOQKiV6pRtqmOearjpOfxUHL5TAsrCrOTDa6urbVhNSpXIEYLrb9mA+kZRvvci3oqwzYSzGdj+J8kl79VKarOurJKaM8SMczuyIVoscio46L6Y//cWeaoyESkUM/k1pYsao0sQ== alphard@alphard-Z97X-Gaming-3" > /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys +chmod 700 /root/.ssh +passwd -u root +systemctl restart ssh +systemctl enable ssh +wget -O /usr/local/bin/neofetch "https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch" +chmod +x /usr/local/bin/neofetch +echo "neofetch --config /etc/neofetch.conf" > /etc/profile.d/motd.sh +echo "" > /etc/motd diff --git a/zerotier.sh b/zerotier.sh new file mode 100644 index 0000000..e249dd4 --- /dev/null +++ b/zerotier.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e +if [[ $(id -u) -ne 0 ]]; then echo "Roda ae como root"; exit 1; fi + +JOIN=d570c57c319bcff7 + +if [ -x "$(command -v apk)" ]; then + apk add wget curl zerotier-one + /etc/init.d/zerotier-one start + sleep 3 + zerotier-cli join "$JOIN" + exit 0 +fi + +if [ -x "$(command -v apt)" ]; then + apt update + apt install -y wget curl + curl -s https://install.zerotier.com | bash + sleep 3 + zerotier-cli join "$JOIN" + exit 0 +fi + +if [ -x "$(command -v yum)" ]; then + yum update + yum install -y wget curl + curl -s https://install.zerotier.com | bash + sleep 3 + zerotier-cli join "$JOIN" + exit 0 +fi + +exit 2