How to configure key-based authentication for SSH

How to configure key-based authentication for SSH