Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 1985  / 3 Years ago, wed, may 26, 2021, 5:44:28

I want to restart an Ubuntu 18.04.4 LTS machine through ssh. I do not have physical access to that machine.



How can I make sure that the ssh service starts automatically on boot so that I can connect again after restart?


More From » 18.04

 Answers
1

From a terminal run systemctl list-unit-files | grep ssh and if the service says enabled it should start back up when the system reboots.



$ systemctl list-unit-files | grep ssh
ssh.service enabled
[email protected] static
sshd.service enabled
ssh.socket disabled


And you can check the current status of ssh by running systemctl | grep ssh



$ systemctl | grep ssh
ssh.service loaded active running OpenBSD Secure Shell server


Hope this helps!


[#3821] Wednesday, May 26, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
piscen

Total Points: 134
Total Questions: 117
Total Answers: 133

Location: Indonesia
Member since Wed, Jul 7, 2021
3 Years ago
piscen questions
Sun, Oct 23, 22, 16:06, 2 Years ago
Wed, May 17, 23, 01:44, 1 Year ago
Thu, Nov 24, 22, 19:09, 2 Years ago
Mon, Mar 6, 23, 02:42, 1 Year ago
;