Automatically Start SSH Server on Boot

Ok, something just occured to me. Can you please try with ssh.service, not sshd.service:

sudo systemctl status ssh.service

This, of course, with openssh-server package installed. Also, what is the output of:

ls -la /etc/systemd/system/ssh*.service

Explanation: the unit file in /lib/systemd/system is ssh.service, not sshd.service. It does contain directive Alias=sshd.service, but I noticed that doesn’t necessarily work if the symbolic link in /etc/systemd/system is ssh.service, not sshd.service.

Old dogs like me automatically think “with D”, since it’s a daemon, not a client we are talking about here.

If you got status with ssh.service, you can use that to enable ssh daemon at boot:

sudo systemctl enable ssh.service
6 Likes