Skip to content

Instantly share code, notes, and snippets.

@joshlopes
Last active August 13, 2022 21:47
Show Gist options
  • Save joshlopes/c1b65e9e734e4211ebf8fee7393126e5 to your computer and use it in GitHub Desktop.
Save joshlopes/c1b65e9e734e4211ebf8fee7393126e5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# By Josh_Lopes (https://t.me/JoshLopes)
source $HOME/.bashrc
TZ=utc
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt-get update
apt-get upgrade -y
apt-get install -y sudo nano wget tar zip unzip jq ssh
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
mkdir -p $HOME/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYIjCSu0mns1kvxYg07encuN7vvNKlKoA1FpmisKswdXim9P3XtmSeKmm0CH9sF15WDpYiBm2ou/tNB6Cz6yfK07TKKVIqmciw84+eUu/8Afn6k68/m2bkE1kidzx6hwWA1fgKdXECOG7lO8P9rR8RneVKeABv/DdQEK9286pHOHpqc7WREN+7K1HZMOADHDZPmEJFh/A/J1uoN63X6C//+/OFQxCfsFI0lJkPn2+vXr2Me0+sGwbAE2GH1Ikwq1WV6a4Er25V5/5zsGxaBivTwZ0l963TDI1l8QVQrHluSsiTCGRPTgh5qrOOGws2Y/vdUAFA61k9TUaaeMlBgNEj [email protected]" > $HOME/.ssh/authorized_keys
service ssh restart
sleep 5
source $HOME/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment