The first thing you need for SSH authentication using a public key is a personal key pair. This tutorial describes how to use PuTTYgen to create an RSA key pair consisting of a public key and a private key.
On Linux operating systems, the shell command ssh-keygen creates an RSA key pair consisting of the public part 'id_rsa.pub' and the private part 'id_rsa'.