I have few client systems where I need to push the ssh key and login from my server without authentication prompts.
First, on the server, I created ssh key as below whi
In my case it was the missing .pub extension of a key. I pasted it from clipboard and saved as mykey. The following command returned described error:
.pub
mykey
ssh-copy-id -i mykey localhost
After renaming it with mv mykey mykey.pub, works correctly.
mv mykey mykey.pub
ssh-copy-id -i mykey.pub localhost