How to setup ssh public key for another machine without access?

Well, you WILL have to transfer the public key to the remote server somehow.

However since the public key is not confidential (hence the name), feel free to copy it on an USB stick, upload it somewhere, put it in a note, etc...

Just make sure the key you add on the server is indeed the one you uploaded from your client!


I usually move ssh keys by copy and paste. but you can also send them via email, http, netcat, etc, they're just text.

If you can get the public key for machine C onto machine B you can then ssh from B to A and install the key for C