# I cant start sshd

**URL:** <https://forum.endeavouros.com/t/i-cant-start-sshd/57602>\
**Category:** XFCE\
**Created:** [July 3, 2024, 5:17am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602 "2024-07-03T05:17:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavlar](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pavlar/32/120146_2.png) [@pavlar](https://forum.endeavouros.com/u/pavlar)\
**Post date:** [July 3, 2024, 5:18am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/1 "2024-07-03T05:18:00Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Bryanpwo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/bryanpwo/32/130600_2.png) [@Bryanpwo](https://forum.endeavouros.com/u/Bryanpwo)\
**Post date:** [July 3, 2024, 5:34am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/2 "2024-07-03T05:34:07Z")

</div>

Read the pinned post on the forum:

> [@The sshd service needs to be restarted after upgrading to openssh-9.8p1](https://forum.endeavouros.com/t/the-sshd-service-needs-to-be-restarted-after-upgrading-to-openssh-9-8p1/57535/5):
>
> My x86\_64 daily driver was aleady at openssh-9.8p1. I only update my LAN server about every month, so it was still 9.7p1. All was still working. I updated openssh on the LAN server, then rebooted. After reboot every thing was working. I guess the LAN’s reboot was the same as restarting the sshd service. Thanks for the heads up. Pudge

---

<div class="post-metadata">

**Author:** ![pavlar](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pavlar/32/120146_2.png) [@pavlar](https://forum.endeavouros.com/u/pavlar)\
**Post date:** [July 3, 2024, 5:37am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/3 "2024-07-03T05:37:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [July 3, 2024, 5:46am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/4 "2024-07-03T05:46:42Z")

</div>

> [@pavlar](#):
>
> See “systemctl status sshd.service” and “journalctl -xeu sshd.service” for details.

This ^

---

<div class="post-metadata">

**Author:** ![pavlar](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pavlar/32/120146_2.png) [@pavlar](https://forum.endeavouros.com/u/pavlar)\
**Post date:** [July 3, 2024, 5:53am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/5 "2024-07-03T05:53:05Z")

</div>

> [@pavlar](#):
>
> journalctl -xeu sshd.service

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](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](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](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

---

<div class="post-metadata">

**Author:** ![pavlar](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pavlar/32/120146_2.png) [@pavlar](https://forum.endeavouros.com/u/pavlar)\
**Post date:** [July 3, 2024, 6:01am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/6 "2024-07-03T06:01:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pavlar](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pavlar/32/120146_2.png) [@pavlar](https://forum.endeavouros.com/u/pavlar)\
**Post date:** [July 3, 2024, 6:02am UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/7 "2024-07-03T06:02:41Z")

</div>

How can this be that the daemon sshd does not start but ssh connection works?

---

<div class="post-metadata">

**Author:** ![BluishHumility](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/bluishhumility/32/70412_2.png) [@BluishHumility](https://forum.endeavouros.com/u/BluishHumility)\
**Post date:** [July 3, 2024, 3:47pm UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/8 "2024-07-03T15:47:44Z")

</div>

> [@pavlar](#):
>
> Unable to negotiate with xxxx port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
> 
> I add to ssh config:
> 
> ```auto
> Host *
> HostName *
> HostKeyAlgorithms=+ssh-dss
> 
> ```

You may also need to add to `PublickeyAcceptedAlgorithms` (on the client).

You can add to `~/.ssh/config`:

```auto
Host *
  HostKeyAlgorithms +ssh-rsa,ssh-dss
  PubkeyAcceptedAlgorithms +ssh-rsa,ssh-dss

```

> [@pavlar](#):
>
> …and now i cant use sshd:

Have you made any changes to `/etc/ssh/sshd_config`? If so, check for a misconfiguration.

If not, double-check the permissions on your SSH-related files

```auto
chmod 755 /etc/ssh
chmod 644 /etc/ssh/ssh_config
chmod 600 /etc/ssh/ssh_host_*

```

Also, in your user directory, `~/.ssh` should be 700, the private keys should be 600, and the public keys should be 644.

> [@pavlar](#):
>
> How can this be that the daemon sshd does not start but ssh connection works?

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.

---

<div class="post-metadata">

**Author:** ![BluishHumility](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/bluishhumility/32/70412_2.png) [@BluishHumility](https://forum.endeavouros.com/u/BluishHumility)\
**Post date:** [July 19, 2024, 11:44pm UTC](https://forum.endeavouros.com/t/i-cant-start-sshd/57602/9 "2024-07-19T23:44:40Z")

</div>

Closing since the user has opened a new topic for the same issue. [I cant work with sshd](https://forum.endeavouros.com/t/i-cant-work-with-sshd/58143)
