sshd: no hostkeys available -- exiting.
1、问题, 在启动ssh服务是出现如下问题

2、解决方法
root@DESKTOP-1N42TVH:/home# ssh-keygen -A ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
3、测试
root@DESKTOP-1N42TVH:/home# service ssh start * Starting OpenBSD Secure Shell server sshd [ OK ] root@DESKTOP-1N42TVH:/home# /etc/init.d/ssh restart * Restarting OpenBSD Secure Shell server sshd [ OK ] root@DESKTOP-1N42TVH:/home# /etc/init.d/ssh status * sshd is running
root@DESKTOP-1N42TVH:/home# ps -e | grep sshd 2494 ? 00:00:00 sshd

浙公网安备 33010602011771号