Score:1

SSH service failing on Reboot

tn flag

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 avatar
cn flag
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*
Score:0
bo flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.