Generate and upload a public key to the server, working