primeiro esforço

This commit is contained in:
alphard 2022-08-20 22:11:41 -03:00
commit b1b730cd43
4 changed files with 79 additions and 0 deletions

16
packages_alpine.sh Normal file
View File

@ -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

14
packages_centos.sh Normal file
View File

@ -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

16
packages_debian.sh Normal file
View File

@ -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

33
zerotier.sh Normal file
View File

@ -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