Reputation: 83
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.
It would be really helpful if you could answer my questions.
Upvotes: 1
Views: 3137
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