Skip to content

Instantly share code, notes, and snippets.

View Kinuseka's full-sized avatar

Kinuseka

View GitHub Profile
@Kinuseka
Kinuseka / SetupUserPEM.sh
Last active December 4, 2024 17:26
Create sudo user on VPS
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit
fi
read -p 'Username: ' user
read -p "ssh Public key for $user: " userpub
echo "The rest of the details will now be taken care of the program"
read -p 'Continue? [Y/n]: ' usercont