User with shell access

  • Answered
I am a relatively new VPS user configuring Django, and I ssh as root to do this. Most of my experience is with high-performance workstations, and normally I would disable ssh by root and rely on sudo as another user. Even if I retain ssh by root, I would prefer to ssh as another user for routine purposes then sudo.

Can I create a user account for this purpose? If so, how? I tried creating another cPanel user through WHM but became tangled with domains, etc.

Should I just create a user account at the command line while ssh as root? This makes me nervous since I do not fully understand how InMotion has configured CentOS.

Hello WREmanuel, Thank you for your question on creating users. When you create any new cPanel account, including the default one on your VPS, that user has the ability to SSH in (as long as you add the IP to the firewall for them.) They will simply use the same cPanel username and password when logging in via SSH. You can certainly create a new user if you want via the command line, though it may not be tied to any account. Sudo, as you indicated you wanted to use, would come in handy. You can disable the root SSH login (though not the root account itself) by editing /etc/ssh/sshd_config and changing PermitRootLogin yes to PermitRootLogin no. Also, you will want to ensure the account you are using is in your sudoers list via visudo. Here is a link about visudo. It is a dangerous file, so be careful with editing it. Kindest Regards, Scott M