appleuser
appleuser

Reputation: 83

Copying Your Public Key Using ssh-copy-id

I am trying to configure a SSH Key-Based Authentication and after i created one, i want to copy the SSH Public Key to my server. When i give the following command on git bash : ssh-copy-id username@remote_host , i am asked for a password.

  1. remote_host must be the floating_ip of the VM that i am trying to connect to ?
  2. Which password should i type in ?

It would be really helpful if you could answer my questions.

Upvotes: 1

Views: 3137

Answers (1)

VonC
VonC

Reputation: 1324228

On the first SSH operation (here an ssh-copy-id), you would need the password of the remote account, in order for the command to add your public kay to said remote user account ~/.ssh/authorized_keys.

Only then subsequent SSH commands would work without asking for password (only passphrase, if your private key is passphrase-protected, and if you have not added the private key to an ssh agent, for caching said passphrase).

Upvotes: 1

Related Questions