1 00:00:06,810 --> 00:00:07,643 - Okay. 2 00:00:07,643 --> 00:00:11,890 To examine the contents of an sshd service or any service, 3 00:00:11,890 --> 00:00:16,350 'sudo systemctl cat' is the best way to do that. 4 00:00:16,350 --> 00:00:20,520 That will show you the actual configuration. 5 00:00:20,520 --> 00:00:22,200 And there we go. 6 00:00:22,200 --> 00:00:23,700 We can see the unit section, 7 00:00:23,700 --> 00:00:25,560 the service section, the install section, 8 00:00:25,560 --> 00:00:28,887 including this beautiful 'Restart=on-failure'. 9 00:00:30,090 --> 00:00:32,910 Now we need to make sure that the SSH service 10 00:00:32,910 --> 00:00:36,210 will automatically be started after a reboot. 11 00:00:36,210 --> 00:00:39,090 Maybe you just want to check in the current 12 00:00:39,090 --> 00:00:42,180 status if that is already the case. 13 00:00:42,180 --> 00:00:45,030 And I'm looking for this 'loaded enabled'. 14 00:00:45,030 --> 00:00:49,200 'Enabled' means it's automatically started after the reboot. 15 00:00:49,200 --> 00:00:50,970 'vendor preset: enabled' 16 00:00:50,970 --> 00:00:51,803 What is that? 17 00:00:51,803 --> 00:00:55,320 Well, that means that this unit by default 18 00:00:55,320 --> 00:00:58,350 after installation will automatically be enabled. 19 00:00:58,350 --> 00:01:01,020 So, basically you don't have to do anything to 20 00:01:01,020 --> 00:01:03,060 get that done anymore. 21 00:01:03,060 --> 00:01:04,683 It's an automatic procedure. 22 00:01:05,820 --> 00:01:09,000 Now, in case it's not automatically started 23 00:01:09,000 --> 00:01:12,960 then you can use 'sudo systemctl enable sshd' 24 00:01:13,890 --> 00:01:15,240 and that'll enable it. 25 00:01:15,240 --> 00:01:17,460 No action required here. 26 00:01:17,460 --> 00:01:19,560 Then we need to find out the default target. 27 00:01:19,560 --> 00:01:24,560 So 'sudo systemctl get-default' will do that. 28 00:01:26,340 --> 00:01:29,580 So 'graphical.target' is default target. 29 00:01:29,580 --> 00:01:32,730 And finally a list of all active units. 30 00:01:32,730 --> 00:01:36,300 Well, that will be 'list-units'. 31 00:01:36,300 --> 00:01:38,580 List units showing you all the units 32 00:01:38,580 --> 00:01:41,850 that are currently loaded including their status, 33 00:01:41,850 --> 00:01:43,950 which is nice for a quick overview. 34 00:01:43,950 --> 00:01:48,483 As you can see a 152 in total, that's quite impressive.