Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution

If you get error messages like this it is usually because /var/run/sshd does not exist.

root@userbox:/# service sshd status
‚óŹ ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
   Active: failed (Result: start-limit-hit) since Wed 2019-04-10 02:24:44 EDT; 1
  Process: 511 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)

Warning: Journal has been rotated since unit was started. Log output is incomple
root@userbox:/# service sshd start
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.



May 16 11:45:16userbox systemd[1]: ssh.service: Control process exited, code=exited status=255
May 16 11:45:16userbox systemd[1]: Failed to start OpenBSD Secure Shell server.
May 16 11:45:16userbox systemd[1]: ssh.service: Unit entered failed state.
May 16 11:45:16userbox systemd[1]: ssh.service: Failed with result 'exit-code'.
May 16 11:45:16userbox systemd[1]: ssh.service: Service hold-off time over, scheduling restart.
May 16 11:45:16userbox systemd[1]: Stopped OpenBSD Secure Shell server.
May 16 11:45:16userbox systemd[1]: ssh.service: Start request repeated too quickly.
May 16 11:45:16userbox systemd[1]: Failed to start OpenBSD Secure Shell server.
May 16 11:45:16userbox systemd[1]: ssh.service: Unit entered failed state.
May 16 11:45:16userbox systemd[1]: ssh.service: Failed with result 'start-limit-hit'.

 

This is a hack but is the simplest fix to this bug:

echo "mkdir -p /var/run/sshd;service sshd restart" > /etc/rc.local
 

Basically we just need to create /var/run/sshd and restart SSHD and it will be good and SSH will start once again.


Tags:

ubuntu, debian, mint, linux, sshd, openssh, server, reboot, solutionif, var, userbox, ssh, openbsd, shell, lib, systemd, enabled, vendor, preset, enab, active, wed, edt, execstartpre, usr, sbin, exited, rotated, output, incomple, quot, systemctl, journalctl, xe, scheduling, restart, repeated, hack, simplest, echo, mkdir, etc, rc,

Latest Articles

  • Linux Mint Mate Customize the Lock screen messages and hide username and real name
  • Ubuntu/Gnome/Mint/Centos How To Take a partial screenshot
  • ssh how to verify your host key / avoid MIM attacks
  • Cisco IP Phone CP-8845 8800/8900 Series How To Reset To Factory Settings Instructions
  • ls how to list ONLY directories
  • How to encrypt your SSH private key file id_rsa
  • Linux Mint 18 Disable User Name List from showing on Login Screen
  • Firefox Cannot Hit Enter Key In Address Bar and Location History Not Working
  • Cisco Unified Communications Manager / CUCM IP 8.6,10,12 Install Error Solution
  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution
  • nmap how to scan for all ports and not just the 1000 most common ports
  • Windows 7,8,10 and Server 2008, 2012, 2016, 2019 Read Only Attribute Won't Go Away
  • bind / named how to make a wildcard record and retain defined A records
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM
  • Local Vs Universally Administered MAC Address NIC Refuses to come up
  • Cisco Unified Communications Manager 12 CUCM 12 - How To Enable Video Calling
  • Windows 7, 8, 10, Windows Server 2008, 2012, 2016, 2019 How To AC97 Audio Drivers and Other Unsigned Drivers
  • Cisco Unified Communications Manager / CUCM IP Telephony Definitions
  • tftp Linux xinetd verbose logging
  • Linux delete unused tap devices automatically