ssh-copy-id no identities found error

后端 未结 13 1156
情深已故
情深已故 2021-01-31 01:21

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

13条回答
  •  借酒劲吻你
    2021-01-31 01:48

    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.

提交回复
热议问题