I cant connect
ssh xxxx
Unable to negotiate with xxxx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
I add to ssh config:
Host *
HostName *
HostKeyAlgorithms=+ssh-dss
…and now i cant use sshd:
systemctl status sshd.service
× sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Wed 2024-07-03 08:11:09 UTC; 5min ago
Duration: 19min 21.860s
Invocation: 65b0afd7f9c44d3fadb989e141cd3356
Process: 11019 ExecStart=/usr/bin/sshd -D (code=exited, status=255/EXCEPTION)
Main PID: 11019 (code=exited, status=255/EXCEPTION)
Jul 03 08:11:09 pal systemd[1]: sshd.service: Scheduled restart job, restart counter is at 5.
Jul 03 08:11:09 pal systemd[1]: sshd.service: Start request repeated too quickly.
Jul 03 08:11:09 pal systemd[1]: sshd.service: Failed with result ‘exit-code’.
Jul 03 08:11:09 pal systemd[1]: Failed to start OpenSSH Daemon.
Although this may not be due to adding lines to the config
systemctl restart sshd.service
Job for sshd.service failed because the control process exited with error code.
See “systemctl status sshd.service” and “journalctl -xeu sshd.service” for details
systemctl stop sshd.service
[root@pal ssh]# systemctl start sshd.service
Job for sshd.service failed because the control process exited with error code.
See “systemctl status sshd.service” and “journalctl -xeu sshd.service” for details.
03 08:37:51 pal systemd[1]: sshd.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Automatic restarting of the unit sshd.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Jul 03 08:37:51 pal systemd[1]: sshd.service: Start request repeated too quickly.
Jul 03 08:37:51 pal systemd[1]: sshd.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit sshd.service has entered the ‘failed’ state with result ‘exit-code’.
Jul 03 08:37:51 pal systemd[1]: Failed to start OpenSSH Daemon.
░░ Subject: A start job for unit sshd.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit sshd.service has finished with a failure.
░░But there’s nothing useful here
But ssh works
ssh xxxx
The authenticity of host
xxxx can’t be established.
ED25519 key fingerprint is SHA256:m/O5Y6sxMbGtm9nfqq3KOdcIGplJsk60DhWCuISIh6U.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type ‘yes’, ‘no’ or the fingerprint: yes
Warning: Permanently added ‘xxxx’ (ED25519) to the list of known hosts.
xxxx’s password:
Linux boss 5.10.0-30-amd64 #1 SMP Debian 5.10.218-1 (2024-06-01) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have new mail.
Also, in your user directory, ~/.ssh should be 700, the private keys should be 600, and the public keys should be 644.
The SSH service only needs to be running on the server side. The fact that sshd is failing to start will prevent any connections into your “pal” machine, but for the connection you have established with “Linux boss”, “pal” is the client.