Pros of SSH key authentication
The SSH keys are more difficult to hack than passwords and thus are more secure and reliable.
They can be up to 4096 bits in length, making them long, complex, and difficult for hackers to do any data breach.
Additionally, SSH keys aren’t human-generated, so people cannot randomly guess like 123456 thus giving more security.
And unlike passwords, your private SSH key isn’t sent to the server. So even if malicious actors hack into the server, they still can’t access your account.