Under solve Ubuntu ssh not start

Ubuntu ssh has been unable to start.

By  systemctl status ssh.service  view is wrong

 

Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z systemd[1]: Starting OpenBSD Secure Shell server...
Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z sshd[19621]: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z sshd[19621]: Missing privilege separation directory: /var/run/sshd
Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z systemd[1]: Failed to start OpenBSD Secure Shell server.
Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z systemd[1]: ssh.service: Unit entered failed state.
Dec 16 13:35:22 iZm5eckxl2tqyka9eoe7b3Z systemd[1]: ssh.service: Failed with result 'exit-code'

Solution

ssh-keygen -A
mkdir -p  /var/run/sshd

  

Guess you like

Origin www.cnblogs.com/tl542475736/p/12048764.html