Problem

Wenn man den Status des SSHD service wie folgt prüft, erhält man eine Fehlermeldung:

systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-04-03 08:13:48 CEST; 1 weeks 4 days ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 1089 (sshd)
   CGroup: /system.slice/sshd.service
           └─1089 /usr/sbin/sshd -D

Apr 14 11:51:09 ct.web-vision.de sshd[19397]: rexec line 124: Deprecated option RSAAuthentication
Apr 14 11:51:09 ct.web-vision.de sshd[19397]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Apr 14 11:51:11 ct.web-vision.de sshd[19397]: reprocess config line 124: Deprecated option RSAAuthentication
Apr 14 11:51:11 ct.web-vision.de sshd[19397]: Received disconnect from 222.186.30.76 port 35235:11:  [preauth]
Apr 14 11:51:11 ct.web-vision.de sshd[19397]: Disconnected from 222.186.30.76 port 35235 [preauth]
Apr 14 11:51:24 ct.web-vision.de sshd[19440]: rexec line 124: Deprecated option RSAAuthentication
Apr 14 11:51:24 ct.web-vision.de sshd[19440]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Apr 14 11:52:03 ct.web-vision.de sshd[19669]: rexec line 124: Deprecated option RSAAuthentication
Apr 14 11:52:03 ct.web-vision.de sshd[19669]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Apr 14 11:52:03 ct.web-vision.de sshd[19669]: Connection closed by 46.20.xx.xxx port 46874 [preauth]
BASH

Lösung


Gehen Sie zur Lösung wie folgt vor:
  1. Loggen Sie sich als `root` User per SSH ein.
  2. Führen Sie dann den folgenden Befehl aus: /usr/bin/ssh-keygen -A 
  3. Restarten Sie nun den sshd Service: systemctl restart sshd 

Prüfung:

systemctl status sshd
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-04-14 11:54:10 CEST; 3s ago
     Docs: man:sshd(8)
           man:sshd_config(5)
 Main PID: 20449 (sshd)
   CGroup: /system.slice/sshd.service
           └─20449 /usr/sbin/sshd -D

Apr 14 11:54:10 ct.web-vision.de systemd[1]: Starting OpenSSH server daemon...
Apr 14 11:54:10 ct.web-vision.de sshd[20449]: /etc/ssh/sshd_config line 124: Deprecated option RSAAuthentication
Apr 14 11:54:10 ct.web-vision.de sshd[20449]: Server listening on 0.0.0.0 port ...
Apr 14 11:54:10 ct.web-vision.de sshd[20449]: Server listening on :: port ...
Apr 14 11:54:10 ct.web-vision.de systemd[1]: Started OpenSSH server daemon.
BASH


Verwandte Artikel