Description of problem: After installing openssh-server (urpmi openssh-server) host keys are not created automatically. Failed to start OpenSSH server daemon. Version-Release number of selected component (if applicable): Mageia 6 XFCE Live, openssh-server-7.5.p1-1.mga6 Steps to Reproduce: 1. urpmi openssh-server 2. service sshd restart (or systemctl restart sshd.service) 3. Error: Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details. 4. View journalctl -xe: -- ÐаÑÐ°Ñ Ð¿ÑоÑеÑÑ Ð·Ð°Ð¿ÑÑка ÑниÑа sshd.service. Ð°Ð¿Ñ 02 12:00:28 gw6.local sshd[2103]: Could not load host key: /etc/ssh/ssh_host_rsa_key Ð°Ð¿Ñ 02 12:00:28 gw6.local sshd[2103]: Could not load host key: /etc/ssh/ssh_host_ecdsa_key Ð°Ð¿Ñ 02 12:00:28 gw6.local sshd[2103]: Could not load host key: /etc/ssh/ssh_host_ed25519_key Ð°Ð¿Ñ 02 12:00:28 gw6.local sshd[2103]: sshd: no hostkeys available -- exiting. Ð°Ð¿Ñ 02 12:00:28 gw6.local systemd[1]: sshd.service: Main process exited, code=exited, status=1/FAILURE Ð°Ð¿Ñ 02 12:00:28 gw6.local systemd[1]: Failed to start OpenSSH server daemon. -- Subject: ÐÑибка ÑниÑа sshd.service -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- ÐÑоизоÑел Ñбой ÑниÑа sshd.service. -- -- РезÑлÑÑаÑ: failed. Ð°Ð¿Ñ 02 12:00:28 gw6.local systemd[1]: sshd.service: Unit entered failed state. Ð°Ð¿Ñ 02 12:00:28 gw6.local systemd[1]: sshd.service: Failed with result 'exit-code'.
What if you use start instead of restart?
CC: (none) => jani.valimaa
(In reply to Jani Välimaa from comment #1) > What if you use start instead of restart? The situation is similar. In all previous releases of Mageia (always) the host keys were created automatically, directly on the final stage urpmi openssh-server. In this case only creates the files: /etc/ssh/denyusers /etc/ssh/moduli /etc/ssh/sshd_config. Need to run the daemon sshd host keys are not created. You have to manually run something like: ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N " -t rsa ssh-keygen-f /etc/ssh/ssh_host_dsa_key -N " -t dsa, and the like.
Keys were created properly earlier, but I think last openssh update broke it as some, but not all, changes were synced from Fedora and they changed how keys are generated.
Source RPM: (none) => openssh-7.5p1-1.mga6
Key generation is now fixed in openssh-server-7.5p1-2.mga6. It should be available anytime soon in mirrors.
(In reply to Jani Välimaa from comment #4) > Key generation is now fixed in openssh-server-7.5p1-2.mga6. It should be > available anytime soon in mirrors. Well, let's hope for the best. Thanks for the dialogue.
I'm closing this as FIXED. Feel free to reopen if needed.
Resolution: (none) => FIXEDStatus: NEW => RESOLVED
CC: (none) => akkaran046