SSH: Getting the public key using SSH

  • If you have ssh with password-based authentication setup on the remote machine, you can, on the local machine, use scp ~/.ssh/ user@ip-address:

    This will copy the public key for the keypair you created earlier to the home directory of user on the remote machine.