albatroz
(Rodrigo)
April 17, 2020, 12:46pm
1
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 . Thank you all, Rodrigo
alciregi
(Alessio)
April 17, 2020, 12:50pm
2
Hello @albatroz .
Could you provide the content of /usr/lib/systemd/system/sshd.service
cat /usr/lib/systemd/system/sshd.service
2 Likes
albatroz
(Rodrigo)
April 17, 2020, 1:01pm
3
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
alciregi
(Alessio)
April 17, 2020, 1:07pm
4
The content of the file is like the one I have on my system, so the problem is not there.
albatroz
(Rodrigo)
April 17, 2020, 1:14pm
5
Ok .So I will research more about it.
Thank you very much for your time.
alciregi
(Alessio)
April 17, 2020, 1:22pm
6
You should have a look to the logs.
Log files contain messages about the system, including the kernel, services, and applications running on it. These contain information that helps troubleshoot issues, or simply monitor system functions. Fedora uses…
alciregi
(Alessio)
April 17, 2020, 1:26pm
7
In addition, out of curiosity, what is the result of this command?
systemctl --failed
1 Like
albatroz
(Rodrigo)
April 17, 2020, 1:42pm
8
The result after the command $ systemclt --failed
0 loaded units listed.
alciregi
(Alessio)
April 17, 2020, 1:48pm
9
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
albatroz
(Rodrigo)
April 17, 2020, 1:52pm
10
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
1 Like
albatroz
(Rodrigo)
April 17, 2020, 1:57pm
11
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.
alciregi
(Alessio)
April 17, 2020, 2:40pm
12
albatroz:
why I have in Docs
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