SSH why is referred as sshd and ssh?

Hello

About SSH , if I want manipulate this service through the systemctl command must be used the sshd term. If is used the ssh term an error happens.

But through the firewall-cmd command according with many tutorials about fedora/redhat and even from here:

Where appears

sudo firewall-cmd --add-service=ssh ...

Is used the ssh term and not the sshd term. Why this difference?

There’s more than one SSH protocol implementation:

  • OpenSSH - preinstalled in Fedora, includes the sshd service.
  • Dropbear - lightweight SSH server and client.

Firewalld refers to the SSH protocol, while systemd refers to the sshd service.

2 Likes

They are two different names for two different things. sshd is the name of the program which acts as the ssh server. This follows the early BSD tradition by using a “d” suffix for server program, for example telnetd or ftpd.

The ssh term used by firewalld refers to the port number as defined by the file /etc/services.

1 Like

Yes. The “d” suffix stands for “daemon”, a program that runs in the background.

1 Like

Thanks to all for the replies.

I understood the d meaning. It has a lot of sense.

sshd is the name of the program which acts as the ssh server

Yes, I understand it is the name of the service itself. Is the following relation correct?

sshd ---> OpenSSH Server

And it is interesting due the following:

  • In Ubuntu when is used the systemctl command is mandatory use the ssh term. Thus if is used the sshd term arises an error.

Of course, has more sense use the sshd term due the inclusion and meaning of d.

Therefore it is a confusion for me: because if both OS use OpenSSH why the following happens for the systemctl command:

Fedora -> systemctl -> uses sshd
Ubuntu -> systemctl -> uses ssh

About:

The ssh term used by firewalld refers to the port number as defined by the file /etc/services

Thanks for that point: but because the sudo firewall-cmd --list-all command shows the services property with the ssh term. It was confuse for me. To be honest I expected the sshd term too.

About

OpenSSH - preinstalled in Fedora, includes the sshd service.
Dropbear - lightweight SSH server and client.

Very interesting about the latter … because according with my understanding OpenSSH works with the openssh-server and openssh-client terms. So it is the first time I read about the Dropbear term.

Thank You

I believe Dropbear is an alternative to OpenSSH. The former is not installed by default on fedora though it seems to be in the repo. Switching between openssh and dropbear would be a manual process for configuring it.

# dnf info dropbear
Last metadata expiration check: 0:01:34 ago on Fri 19 Jul 2024 09:35:48 AM CDT.
Available Packages
Name         : dropbear
Version      : 2022.83
Release      : 3.fc40
Architecture : x86_64
Size         : 181 k
Source       : dropbear-2022.83-3.fc40.src.rpm
Repository   : fedora
Summary      : Lightweight SSH server and client
URL          : https://matt.ucc.asn.au/dropbear/dropbear.html
License      : MIT
Description  : Dropbear is a relatively small SSH server and client. It's particularly useful
             : for "embedded"-type Linux (or other Unix) systems, such as wireless routers.
1 Like

Note that Firewalld relies on its own service definitions, not /etc/services:
firewalld.service: firewalld service configuration files | firewalld File Formats | Man Pages | ManKier

1 Like

Eh, there isn’t a standard. Every distribution may have its own nomeclature and history.
I.e. on Fedora Linux the Apache Web Server service is called httpd, while on Debian (and thus on Ubuntu too) it is called apache2.
On firewalld the service is “http” to allow the port 80 and “https” for the port 443, while on UFW (if I remember correctly) they are “Apache” and “Apache Secure”.

2 Likes

That is alright until you use a different web server instead of apache.

2 Likes

Correct. On ufw, there is Nginx/Nginx secure, or you can use http and https too.

Uncontrolled Wall Fire?

2 Likes