Kubernetes cluster to add node, first configure SSH password-free login
[Email protected]:/etc/ansible# Ssh-copy-id172.18.196.6/usr/bin/ssh-copy-id:info:source of key (s) to BES installed:"/root/.ssh/id_rsa.pub"/usr/bin/ssh-copy-id:info:attempting to loginchWith theNewKey (s), to filter outAny that is already installed/usr/bin/ssh-copy-id:info:1Key (s) remain to be installed--ifYou is prompted now it isTo install theNewKeys[email protected]172.18.196.6's Password:Permission denied, pleaseTryagain. [Email protected]172.18.196.6's Password:Permission denied, pleaseTryagain. [Email protected]172.18.196.6's Password:Permission denied (Publickey,password).
Here appears Permission denied, please try again. This problem should be the server-side SSH service configured to disable the root user login policy.
So go to server 172.18.196.6 modify configuration
/etc/ssh/sshd_config
Change Permitrootlogin to Yes#permitrootlogin prohibit-passwordpermitrootlogin Yes
Then restart the SSH service
Service sshd Restart
If you are wrong, you can also change the password of SSH
SSH-KEYGEN-T Rsa-b 2048
passwd Root
Try to build it again.
Then modify the Hosts file
... # reserved group, subsequent add node nodes using [new-node] 172.18. 196.6 node_id=node6 node_ip="172.18.196.6" ...
Run again
addnode.yml.
Kubernetes Cluster new node