ssh配置出现
ssh-copy-id error ssh connect to host port 22 connection timed out
向ping ip 看一下或者用 telnet +ip+端口看一下
例如telnet 127.0.0.1 22
再cat /etc/hosts 看一下hosts文件配置对不对
配置完之后一定要 systemctl restart network 重启网络
再ping一下
出现下面结果才行
[hadoop@localhost root]$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.042 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.047 ms
然后再ssh之前的操作即可