22 lines
1.3 KiB
Bash
22 lines
1.3 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
apt update
|
|
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-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOny4oiN+qrs+Tj2XB3dUuI/9CixtiOQZkxE7mOrL9N1 glauber@altera" > /root/.ssh/authorized_keys
|
|
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLMpGDC0cEgkV5rZwuZ8oTdjnsXChfU1PBCSMJZWvdcElFJoekGuHaOKZMT6JgHFOnq4tWg9Ph4SLSOfs1+dWD0YANA+uhi7+EA+ISPf+hDgdeOSFeYJqpCHiGdJeKKPdMC2BTrMcuZkPLlK+7XDF553mpX2JzOK7PqCY3aZOdmw+YmBUr7vQhDl48Nc/vtpYCDw+Msgc+vySofBXlAtJu9EO+fAoM6+Mxv6VFPW9myMaSQK9K0bBGAB30O8kSp/ybrBqWqsqX8ozX5yfeiE/6elY6W5zR0EHJKf0cBRIBHVwjHpT27AoUQhAYFToUjgZq0jU7Sh0BLs3AMwwN6YZB prppedro@arrandale" >> /root/.ssh/authorized_keys
|
|
chmod 600 /root/.ssh/authorized_keys
|
|
chmod 700 /root/.ssh
|
|
passwd -u root || true
|
|
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/telnet
|
|
ln -s /usr/bin/busybox /usr/local/bin/traceroute
|
|
rm -f /etc/motd
|
|
ln -sf /usr/share/zoneinfo/America/Araguaina /etc/localtime
|