ssh:连接到主机本地主机端口 22:连接被拒绝

ssh:连接到主机本地主机端口 22:连接被拒绝

我已经安装了hadoop并且ssh.hadoop工作正常,然后今天运行命令时出现以下错误sbin/start-dfs.sh

Starting namenodes on [localhost]
localhost: ssh: connect to host localhost port 22: Connection refused
Starting datanodes
localhost: ssh: connect to host localhost port 22: Connection refused
Starting secondary namenodes [chbpc-VirtualBox]
chbpc-VirtualBox: ssh: connect to host chbpc-virtualbox port 22: Connection refused

我检查了 ssh 状态,出现以下错误:

ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Tue 2020-02-04 15:34:10 +04; 3h 35min ago
Process: 946 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)

Feb 04 15:34:09 chbpc-VirtualBox systemd[1]: ssh.service: Control process exited, code=exited status=255
Feb 04 15:34:09 chbpc-VirtualBox systemd[1]: Failed to start OpenBSD Secure Shell server.
Feb 04 15:34:09 chbpc-VirtualBox systemd[1]: ssh.service: Unit entered failed state.
Feb 04 15:34:09 chbpc-VirtualBox systemd[1]: ssh.service: Failed with result 'exit-code'.
Feb 04 15:34:10 chbpc-VirtualBox systemd[1]: ssh.service: Service hold-off time over, scheduling restart.
Feb 04 15:34:10 chbpc-VirtualBox systemd[1]: Stopped OpenBSD Secure Shell server.
Feb 04 15:34:10 chbpc-VirtualBox systemd[1]: ssh.service: Start request repeated too quickly.
Feb 04 15:34:10 chbpc-VirtualBox systemd[1]: Failed to start OpenBSD Secure Shell server.
Feb 04 15:34:10 chbpc-VirtualBox systemd[1]: ssh.service: Unit entered failed state.
Feb 04 15:34:10 chbpc-VirtualBox systemd[1]: ssh.service: Failed with result 'start-limit-hit'.

我怎样才能解决这个问题?

相关内容