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
Actually issues in one of Ubuntu machine is ssh-keygen command was not run properly. I tried running again and navigated into /home/user1/.ssh and able to see id_rsa and id_rsa.pub keys. then tried command ssh-copy-id and it was working fine.
Run following command
# ssh-add
If it gives following error: Could not open a connection to your authentication agent
To remove this error, Run following command:
# eval `ssh-agent`
I had faced this problem today while setting up ssh between name node and data node in fully distributed mode between two VMs in CentOS.
The problem was faced because I ran the below command from data node instead of name node ssh-copy-id -i /home/hduser/.ssh/id_ras.pub hduser@HadoopBox2
Since the public key file did not exist in data node it threw the error.
Old post but I came up with this problem today, ended up googling and had found myself here. I had figured it out on my own but thought I'd share my issue & solution in my case to help out anyone else who may have the same issue.
Issue:
[root@centos [username]]# ssh-keygen -t rsa
Enter file in which to save the key (/root/.ssh/id_rsa):
I HAD JUST HIT ENTER
/usr/bin/ssh-copy-id: ERROR: No identities found
Solution:
Enter file in which to save the key (/root/.ssh/id_rsa): **/home/[username]/id_rsa**
Be sure if you are doing this as root you are coping the key into the user directory you wish to login with. NOT the root user directory.
I was sshing into the machine when performing this operation, so I guess ssh-copy-id just point to the dir you are logged in as by default.
Hope this helps anyone.
You need to specify the key by using -i option.
ssh-copy-id -i your_public_key user@host
Thanks.
came up across this one, on an existing account with private key I copied manually from elsewhere. so the error is because the public key is missing
so simply generate one from private
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub