how to add public key to mac code example Example 1: macbook get my public ssh key cat ~/.ssh/id_rsa.pub Example 2: macos create new public key ssh-keygen -t rsa -b 4096