Skip to content

Instantly share code, notes, and snippets.

@rfong
Last active May 9, 2017 01:20
Show Gist options
  • Select an option

  • Save rfong/06f34b3ea97083f80e5de3ceda747d38 to your computer and use it in GitHub Desktop.

Select an option

Save rfong/06f34b3ea97083f80e5de3ceda747d38 to your computer and use it in GitHub Desktop.
make an ssh user on an ubuntu mashine
sudo adduser $USER
#sudo usermod -aG sudo $USER # Give user sudo?
su - $USER
mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
vim ~/.ssh/authorized_keys
chown -R $USER:$USER ~/.ssh
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment