error: Could not load host key: /etc/ssh/ssh_host_dsa_key
不知為何莫名少了 dsa key
在 CentOS 7 下的 ssh-keygen 支援 -A 來自動建立缺少的 key type
$ ssh-keygen -A
ssh-keygen: generating new host keys: DSA
$ systemctl restart sshd
$ systemctl status sshd
Apr 08 16:13:15 localhost.localdomain systemd[1]: Started OpenSSH server daemon.
Apr 08 16:13:15 localhost.localdomain systemd[1]: Starting OpenSSH server daemon...
Apr 08 16:13:15 localhost.localdomain sshd[2767]: Server listening on 0.0.0.0 port 22.
Apr 08 16:13:15 localhost.localdomain sshd[2767]: Server listening on :: port 22.
搞定!
Orignal From: CentOS 7 sshd 啟動警告『Could not load host key』
沒有留言:
張貼留言