Failed to parse signal string

Hello my dears,

I would like to know why and how can I fix this error:

Failed to parse signal string /usr/lib/systemd/system/sshd.service.

After I executed the command under root:

systemctl enable sshd ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'

I want to the always enable and active the sshd.service after a restart or shutdown my machine.

I will he happy for a solution :slight_smile: . Thank you all, Rodrigo

Hello @albatroz.

Could you provide the content of /usr/lib/systemd/system/sshd.service

cat /usr/lib/systemd/system/sshd.service

2 Likes

Hello alciregi,

Thank you for your quick feedback :). Above you have the output of $ cat /usr/lib/systemd/system/sshd.service

[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.target
Wants=sshd-keygen.target

[Service]
Type=notify
EnvironmentFile=-/etc/crypto-policies/back-ends/opensshserver.config
EnvironmentFile=-/etc/sysconfig/sshd-permitrootlogin
EnvironmentFile=-/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS $CRYPTO_POLICY $PERMITROOTLOGIN
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target
[bodhi@azimute ~]$ cat /usr/lib/systemd/system/sshd.service
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.target
Wants=sshd-keygen.target

[Service]
Type=notify
EnvironmentFile=-/etc/crypto-policies/back-ends/opensshserver.config
EnvironmentFile=-/etc/sysconfig/sshd-permitrootlogin
EnvironmentFile=-/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS $CRYPTO_POLICY $PERMITROOTLOGIN
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

The content of the file is like the one I have on my system, so the problem is not there.

Ok :slight_smile: .So I will research more about it.

Thank you very much for your time.

You should have a look to the logs.
https://docs.fedoraproject.org/en-US/quick-docs/viewing-logs/

In addition, out of curiosity, what is the result of this command?
systemctl --failed

1 Like

The result after the command $ systemclt --failed

0 loaded units listed.

Oooh! Wait!

You are issuing this command!

systemctl enable sshd ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service

All in a line.

No no.

The right command to enable ssh is:
systemctl enable sshd
No need to create symbolic links with ln -s, it is systemctl enable that will take care of that.

2 Likes

Yessss - got it.
I was issuing the command all in a line…
So it´s just $ systemctl enable sshd.service
Ok ok, you all right :slight_smile:

1 Like

Could you explain why I have in Docs: two files ?
man:sshd(8)
man:sshd_config(5)

$ systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-04-17 14:22:57 CEST; 1h 30min ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 5646 (sshd)
Tasks: 1 (limit: 9117)
Memory: 1.1M
CPU: 14ms
CGroup: /system.slice/sshd.service
└─5646 /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.co>

Apr 17 14:22:57 azimute systemd[1]: Starting OpenSSH server daemon…
Apr 17 14:22:57 azimute sshd[5646]: Server listening on 0.0.0.0 port 22.
Apr 17 14:22:57 azimute sshd[5646]: Server listening on :: port 22.
Apr 17 14:22:57 azimute systemd[1]: Started OpenSSH server daemon.

Do you mean man pages?
Well one (man sshd) explains the daemon’s options, the other (man sshd_config) explains the daemon’s configuration file.

1 Like

Ok alciregi :slight_smile: Thank you

1 Like