What, exactly, does ssh-copy-id do?

后端 未结 2 1600
南方客
南方客 2021-02-02 10:53

What does the ssh-copy-id command do, exactly? I\'ve used it numerous times and it works great. However, when I try to manually cut and paste my .pub keyfile to my remote auth

2条回答
  •  情话喂你
    2021-02-02 11:27

    This little command really should work. I use it every time there is no ssh-copy-id, for example when I'm on Mac.

    cat ~/.ssh/id_rsa.pub | ssh @ 'cat >> ~/.ssh/authorized_keys'
    

    IMO It's better than manual copy and paste: in this case you know exactly what content will end up in the file

提交回复
热议问题