Copy the public key to clipboard Linux ssh-keygen -f private.pem -y | xclip macOS ssh-keygen -f private.pem -y | pbcopy Save to file ssh-keygen -f private.pem -y > public.pub