Skip to main content

SSHD No Hostkeys Available 错误解决方案

· One min read
Mo
Software Engineer

Today while trying to start ssh server on my WSL Ubuntu installation on command [ sshd -t ], I got this error:

sshd: no hostkeys available -- exiting

After searching on the web, I found that the solution was really simple, at least in this case.

I only needed to run

ssh-keygen -A

In the /etc/ssh/ folder, and the start the server

/etc/init.d/ssh start