If you are using MacOs you should follow the same steps for generating the keys and configuring the SSH Daemon as in the case of Linux. MacOS and Linux are configured the same for SSH Public Key Authentication.