How to get the SSH public key from the private key? Aug 18, 2018 Run the following to get the SSH public key from the private key: $ ssh-keygen -y -f /PATH/TO/PRIVATE/KEY