Create New User
How to create a new user with sudo priveleges on Ubuntu 16#
-
Log in as root
-
Create the user
adduser newuser
-
See user’s groups
groups newuser
-
Add to sudo group
usermod -aG sudo newuser
-
Become
newuser
sudo su newuser -
-
Create SSH key
ssh-keygen
-
Logout and copy your ssh key to server
ssh-copy-id ubuntu@your-server-ip
Use password to copy it over
-
Disable password authentication
sudo vim /etc/ssh/sshd_config
PasswordAuthentication no
sudo systemctl reload ssh