Information on way to access Jolla phone through ssh using public key is over the Internet. Make it easy for me, we grouped them all here.
First, you need to follow this article, Connecting to a Jolla with a RSA Key File for password-less SSH Access, to copy over the public key to the phone.
After that, update the .ssh folder to 700 permission:
Lastly, update the authorized_keys file to 600 permission: