Skip to content

Instantly share code, notes, and snippets.

@sht
Last active April 13, 2021 17:36
Show Gist options
  • Select an option

  • Save sht/55d150f261cb426033d6dad388bb5fc2 to your computer and use it in GitHub Desktop.

Select an option

Save sht/55d150f261cb426033d6dad388bb5fc2 to your computer and use it in GitHub Desktop.
Basic ubuntu setup
sudo apt-get update -y;
sudo apt-get upgrade -y;
sudo useradd taji;
sudo adduser --disabled-password --gecos "" taji;
sudo mkdir /home/taji;
sudo mkdir /home/taji/.ssh;
wget https://github.com/imtaji.keys
sudo mv imtaji.keys /home/taji/.ssh/authorized_keys;
sudo addgroup sec;
sudo chown -R taji:taji /home/taji/.ssh/;
echo '%sec ALL=(ALL:ALL) NOPASSWD:ALL' | sudo EDITOR='tee -a' visudo;
sudo adduser taji sec;
sudo hostname sec;
#Change the welcome ssh screen
sudo chmod -x /etc/update-motd.d/*;
sudo apt install inxi screenfetch ansiweather -y;
cat > /etc/update-motd.d/taji << ENDOFFILE
#!/bin/sh
echo "GENERAL SYSTEM INFORMATION"
/usr/bin/screenfetch
echo
echo "SYSTEM DISK USAGE"
export TERM=xterm; inxi -D
echo
echo
ENDOFFILE
sudo chmod +x /etc/update-motd.d/taji;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment