Assuming you are logged in as super user or any other user with sudo access
Open your terminal and connect to your Linux using ssh
Use adduser command to create new user account and follow the instructions .
sudo adduser your_user
If you want to disable the password for your ssh login to your Linux instances or machine use following command
sudo adduser your_user --disabled-password
Switch to your new user account using following command
sudo su - your_user
Create .ssh directory inside your_user directory.
Assign the 700 permission to .ssh directory so the user can read,write or open the directory .
chmod 700 .ssh
Create authorized_keys file inside .ssh directory .
Assign 600 permission to restrict other user to write or access.
chmod 600 .ssh/authorized_keys
Add your public key to authorized_keys. Use cat command to add the public keys .
cat >> .ssh/authorized_keys
And Paste your public kays than press Ctrl+d to exit form cat command.
Add your user to super user group using following command.
sudo usermod -aG sudo your_user
Verify that you are able connect with your new user you just have created using following command .
ssh -i your_private_key [email protected]_ip