安装hadoop的时候,需要配置ssh无密登录 , 然后就
[root@hdp101 software]# ssh-copy-id -i /root/.ssh/id_rsa.pub hdp102
/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: connect to host hdp102 port 22: Connection refused
[root@hdp101 software]# yum install openssh-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirror.lzu.edu.cn
* updates: mirror.lzu.edu.cn
Package openssh-server-7.4p1-21.el7.x86_64 already installed and latest version
Nothing to do
SSH 启动
service sshd restart
[root@hdp102 yum.repos.d]# systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-01-23 19:43:03 CST; 6s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 7723 (sshd)
CGroup: /system.slice/sshd.service
└─7723 /usr/sbin/sshd -D
Jan 23 19:43:03 hdp102 systemd[1]: Starting OpenSSH server daemon...
Jan 23 19:43:03 hdp102 sshd[7723]: Server listening on 0.0.0.0 port 22.
Jan 23 19:43:03 hdp102 sshd[7723]: Server listening on :: port 22.
Jan 23 19:43:03 hdp102 systemd[1]: Started OpenSSH server daemon.