首先要设置好主机名hostnamectl,然后编辑文件/etc/hosts
192.168.43.9 node0
192.168.43.10 node1
192.168.43.11 node2
生成密钥对: ssh-keygen -t rsa -P ""
cd .ssh
mv id_rsa.pub authorized_keys
rm -f known_hosts
cd ../
scp -rp .ssh/ node1:/root/
scp -rp .ssh/ node2:/root/
时间: 2024-10-11 23:12:39