Skip to content

Instantly share code, notes, and snippets.

@fpaupier
Created June 9, 2024 12:22
Show Gist options
  • Save fpaupier/09ace384e33fc210e72975d4e07b37e4 to your computer and use it in GitHub Desktop.
Save fpaupier/09ace384e33fc210e72975d4e07b37e4 to your computer and use it in GitHub Desktop.
Cloud instance instal utils
#!/bin/bash
# Ensure the script is run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Install oh my bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
# Set up SSH key for GitHub
echo "Setting up SSH key for GitHub..."
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" || { echo "SSH key generation failed"; exit 1; }
# Make a project repository
echo "Cloning the project repository..."
mkdir -p projects && cd projects || exit
sudo apt update -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment