1

I have an image of Raspberry-Pi, on which I am trying to make sshd running ("corrupted"). On another image, it is already runnung ("good").

On both images I have:

# cat 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
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

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

i.e. no RuntimeDirectory directive. Nevertheless, "good" image starts ssh, while "corrupted" one does not.

#systemctl start ssh

fails.

If I create directory by hands

mkdir /run/sshd

the command

#systemctl start ssh

is starting to work.

The question is: how is it possible for ssh service to work without RuntimeDirectory directive? Who can create it for it?

1 Answer 1

0

On elder versions on systemd, like on Raspberry Pi, this directory is created via

/usr/lib/tmpfiles.d/sshd.conf

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.