troca uns utilitários gnu por busybox
This commit is contained in:
parent
07d36dc99a
commit
af50ab3bd2
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
apk update
|
||||
apk add python3 curl wget nano vim openssh-server openssh-sftp-server bash procps screen socat htop
|
||||
apk del curl wget vim htop screen
|
||||
apk add python3 ca-certificates nano openssh-server openssh-sftp-server bash procps socat tmux
|
||||
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
|
||||
@ -10,6 +11,7 @@ chmod 600 /root/.ssh/authorized_keys
|
||||
chmod 700 /root/.ssh
|
||||
passwd -u root
|
||||
/etc/init.d/sshd restart
|
||||
/etc/init.d/sshd start
|
||||
rc-update add sshd
|
||||
wget -O /usr/local/bin/neofetch "https://raw.githubusercontent.com/dylanaraps/neofetch/master/neofetch"
|
||||
chmod +x /usr/local/bin/neofetch
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
yum install -y python3 curl wget nano vim openssh-server screen socat htop gnupg
|
||||
yum remove curl wget vim htop
|
||||
yum install -y python3 nano openssh-server screen socat busybox
|
||||
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
|
||||
@ -9,6 +10,10 @@ chmod 600 /root/.ssh/authorized_keys
|
||||
chmod 700 /root/.ssh
|
||||
systemctl restart sshd
|
||||
systemctl enable sshd
|
||||
ln -s /usr/bin/busybox /usr/local/bin/wget
|
||||
ln -s /usr/bin/busybox /usr/local/bin/less
|
||||
ln -s /usr/bin/busybox /usr/local/bin/unzip
|
||||
ln -s /usr/bin/busybox /usr/local/bin/curl
|
||||
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
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/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
|
||||
apt purge -y --autoremove curl wget vim screen htop
|
||||
apt install -y python3 nano software-properties-common openssh-server socat busybox ca-certificates
|
||||
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
|
||||
@ -11,6 +12,10 @@ chmod 700 /root/.ssh
|
||||
passwd -u root
|
||||
systemctl restart ssh
|
||||
systemctl enable ssh
|
||||
ln -s /usr/bin/busybox /usr/local/bin/wget
|
||||
ln -s /usr/bin/busybox /usr/local/bin/less
|
||||
ln -s /usr/bin/busybox /usr/local/bin/unzip
|
||||
ln -s /usr/bin/busybox /usr/local/bin/curl
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user