Copying ssh public key

Just for my information.
Is there a reason why we cannot use ssh-copy-id to set the public key ?


What do you want to use ssh-copy-id for, how are you trying to do it, and what errors do you see when you try? Without details it’s impossible to say what might be going on.

The only option indicated is to go through the settings to copy/paste the public key.
On linux, the binary ssh-copy-id is aimed to upload this key.

I know what the command is for, but where are you trying to copy the key to? That almost sounds like you want to use it for pushing over SSH?

I’m not trying to use it.
I was just wondering why the only solution is to use copy/paste.

I can only speculate about the internal decision making at GitHub, but two technical issues are pretty clear:

  • You don’t have a personal account and home directory for SSH access, which ssh-copy-id needs.
  • Allowing SSH access with password would be a serious security problem.

If you want to upload keys automatically, you can use the REST API.