The problem with logging in as root is that you can execute any command - even a command that could accidentally break your server. For this reason and others, we recommend creating another user account and using that at all times. After you log in with the new account, you’ll still be able to execute superuser commands with the sudo command.
Here’s how to add a new user on Ubuntu:
Ubuntu
Open a terminal window and log in to your server via SSH.Create the user by entering the following command. Replace exampleuser with your desired username:
adduser exampleuserAdd the user to the administer the system (admin) group by entering the following command. Replace exampleuser with your username:
usermod -a -G sudo exampleuserLog out of your server as the root user by entering the following command:
logoutLog in to your server as the new user by entering the following command. Replace exampleuser with your username, and the example IP address with your server’s IP address:
ssh exampleuser@122.222.22.22