Start with the command
sudo useradd -d /home/testuser -m testuser
This creates the user and sets up a default home directory. The user doesn't have a password, but you could add one with passwd if you wanted to.
Then create a directory .ssh in their home directory. Create a file called authorized_keys in the directory and copy in contents of the users public key into it.
Chown the .ssh directory (and file) to the user and chmod the file to 600.
Make sure that /etc/sshd_config is set up to deny logging in by password.
The user should be able to login using their public key by setting up their .ssh/config on their home machine.