1

I am working on Rock 5B which have Ubuntu 20.04 LTS server OS (Download from radxa official page), I am facing a issue of ssh service, Whenever I reboot the device ssh service is getting failed. Through debugging I manually starting the service and I am able to do ssh.

Please use below mentioned as reference. Kindly help me with this.

root@rock-5b:/home/rock# sudo service ssh status
�● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; disabled; vendor preset: >
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)

Below is the contents of service file (ssh.service)

[Unit]
Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

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

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

guiverc
  • 30,396
  • Please refer https://askubuntu.com/help/on-topic, Ubuntu and official flavors of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes. Official Ubuntu is on-topic here, you mention using a remix from raxda & not official Ubuntu; that is supported on SE Unix & Linux – guiverc Nov 03 '22 at 05:41

1 Answers1

0

This question is off topic but the answer applies to standard versions of Ubuntu as well.

Your output says that the service is disabled. In order for the service to start at boot, you will need to use systemd to enable the service.

Run the following command to enable the service:

sudo systemctl enable ssh

Once a service is enabled, it will automatically start at boot.


Conversely, you would disable a service to prevent it from starting at boot:

sudo systemctl disable ssh
mchid
  • 43,546
  • 8
  • 97
  • 150