Once a ssh server is installed it will usually accept password and public-key authentication. Allowing only public-key authentication is more secure than allowing password authentication (see Ubuntu documentation link below for an explanation). Password authentication can be disabled in the server's config file.
To make public-key authentication work for you:
- Create a public/private RSA key pair on your client computer
- Transfer your public key to all servers you wish to log in to.
Here are some resources for completing those steps on Ubuntu. You haven't told us which systems and programs you are using. The details will vary with system.