Enabling and disabling sshd at boot via systemd

sshd service is originally written as ssh.service and sshd.service is set as alias name. Check out the last line of following output.

arryph@localhost:~$ systemctl cat sshd.service 
# /lib/systemd/system/ssh.service
[Unit]
Description=OpenBSD Secure Shell server
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

[Service]
EnvironmentFile=-/etc/default/ssh
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify

[Install]
WantedBy=multi-user.target
Alias=sshd.service

Because of this, when ssh.service is enabled, we can refer it as sshd.service. But when you disabled sshd.service and rebooted, ssh.service is no longer loaded and because of this you can't refer it as sshd.service in that condition. You have to refer is as ssh.service instead. so if you run sudo systemctl enable ssh.service, it will enable ssh.service (aliased as sshd.service) successfully.