环境:

Ubuntu 20.04.3-live-server

hyper-v虚拟环境

问题描述:

Ubuntu 20.04.3 启动sshd失败,报错:Failed to start OpenBSD Secure Shell server

sshd -T

提示sshd: no hostkeys available – exiting.

解决方案:

1.查看ssh服务是否开启

​ps -e | grep ssh​

没有反应

2.安装ssh

apt-get install openssh-server openssh-client

提示已安装

3.执行

/etc/init.d/ssh start

启动失败

继续执行​​ssh-keygen -A​

再次启动成功

Ubuntu 20.04.3 启动sshd失败,报错:Failed to start OpenBSD Secure Shell server_ubuntu

Ubuntu 20.04.3 启动sshd失败,报错:Failed to start OpenBSD Secure Shell server_解决方案_02