Add a new user and give him sudo rights (Debian/Ubuntu)

Your sudoers needs the following for this to work:

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

Add the user:

useradd joel -G sudo

Set his password:

passwd joel

Add his directory:

mkdir /home/joel && chown joel.joel /home/joel

Now your user can login to ssh. He can run a run command by prefixing it with sudo.

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.