This article provides the steps to add an SSH user to a Linux server.
- Log into the Linux server via SSH as the root or as an administrative user.
- To add the user, type in the following at the command prompt (where <username> is the user you are adding):
root@server [/]# useradd <username>
- To set the password for the user, type in the following at the command prompt:
- Enter the secure password for the user twice. The user is now configured with the specified password. If the user needs root access to the server, edit /etc/sudoers and add the user into the file as follows:
## Allow root to run any commands anywhere
<username> ALL=(ALL) ALL
- Save the file and the user now has root access to the server.