[Solved] Ubuntu 20.04.3 Fail to Start sshd Error: Failed to start OpenBSD Secure Shell server

Environmental Science:

Ubuntu 20.04.3-live-server
Hyper-V virtual environment

Problem Description:

Ubuntu 20.04.3 fails to start sshd with error: failed to start OpenBSD secure shell server
sshd – T
prompt sshd: no hostkeys available – exiting.

Solution:

1. Check whether the SSH service is enabled
PS - e | grep ssh

No response

2. Install ssh

 apt update
apt-get install openssh-server openssh-client

Prompt installed

3. Implementation

/etc/init.d/ssh start

fail to start

Continue to execute ssh-keygen -A
Restart successfully

Read More: