How to Create a User on Linux EC2 Instance on AWS and Add a Public Key

Creating a user and adding a public key to it can be very tedious. In this article, we will see how this process can be automated using a shell script which can help us avoid human errors that can arise if we do the task manually.