Solution to the error /usr/bin/ssh-copy-id: ERROR: ssh: when configuring SSH keyless link ssh-copy-id on Centos7.9

The error content is as follows:

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: ERROR: ssh: Could not resolve hostname controller: Name or service not known

The third sentence of the error message is translated as: Unable to resolve host name controller: Unknown name or service

Solution one:

vi /etc/hosts

Check whether your host name is correct and whether it is consistent with the keyless name we want to create.

Solution two (applicable to most situations):

vi  ~/.ssh/known_hosts     

Go into this file and delete everything created in it.

Run it again and the error problem will be solved.

Guess you like

Origin blog.csdn.net/m0_70800810/article/details/130916745