Last active
October 14, 2019 18:23
-
-
Save xeoncross/0e6f15f507be70c511aeee7f4a5b8525 to your computer and use it in GitHub Desktop.
Setup a new user on Ubuntu 18+ VPS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming you are logged in as root and the ssh key you want to use already installed for root (i.e. new Digital Ocean VPS) | |
adduser deploy | |
usermod -aG sudo deploy | |
mkdir /home/deploy/.ssh | |
cp /root/.ssh/authorized_keys /home/deploy/.ssh/ | |
chmod 700 /home/deploy/.ssh | |
chown deploy:deploy -R /home/deploy/.ssh | |
# Now switch to user and create a deployment ssh key (if desired) | |
su - deploy | |
cd /home/deploy/.ssh/ | |
ssh-keygen -f id_rsa -t rsa -N '' | |
Author
xeoncross
commented
Oct 14, 2019
- Setup Go
- Setup MySQL/MariaDB
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment