Why not ssh.service but sshd.service?
Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
When you have modified /etc/ssh/sshd_config
, you may execute systemctl restart sshd.service
to reflect the change. At least in my environment, also, systemctl restart ssh.service
works. And systemctl --all list-units ssh*
tells me there isn't any service with the name sshd.service
. Then why is sshd.service
used wide and actually valid?
(I know the name of ssh daemon is sshd
but this is not the reasonable reason, I think.)
I executed the following commands on linux mint 19
(ubuntu
-base) and volumio 2
(raspbian
-base), both of which are based on debian
.
systemctl restart sshd.service; echo $? #=> 0
systemctl restart ssh.service; echo $? #=> 0
systemctl --no-legend --all list-units ssh* #=> only ssh.service exists
ssh systemd
add a comment |Â
up vote
6
down vote
favorite
When you have modified /etc/ssh/sshd_config
, you may execute systemctl restart sshd.service
to reflect the change. At least in my environment, also, systemctl restart ssh.service
works. And systemctl --all list-units ssh*
tells me there isn't any service with the name sshd.service
. Then why is sshd.service
used wide and actually valid?
(I know the name of ssh daemon is sshd
but this is not the reasonable reason, I think.)
I executed the following commands on linux mint 19
(ubuntu
-base) and volumio 2
(raspbian
-base), both of which are based on debian
.
systemctl restart sshd.service; echo $? #=> 0
systemctl restart ssh.service; echo $? #=> 0
systemctl --no-legend --all list-units ssh* #=> only ssh.service exists
ssh systemd
There is no ssh.service:Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.
â jasonwryan
Sep 5 at 5:45
ssh is basically termed as a client, and sshd as a server... so sshd is more reasonable
â Bharat
Sep 5 at 5:48
You should state your distribution, Suse uses sshd.service.
â RalfFriedl
Sep 5 at 5:49
@RalfFriedl Thank you. I added the distribution info.
â ynn
Sep 5 at 5:57
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
When you have modified /etc/ssh/sshd_config
, you may execute systemctl restart sshd.service
to reflect the change. At least in my environment, also, systemctl restart ssh.service
works. And systemctl --all list-units ssh*
tells me there isn't any service with the name sshd.service
. Then why is sshd.service
used wide and actually valid?
(I know the name of ssh daemon is sshd
but this is not the reasonable reason, I think.)
I executed the following commands on linux mint 19
(ubuntu
-base) and volumio 2
(raspbian
-base), both of which are based on debian
.
systemctl restart sshd.service; echo $? #=> 0
systemctl restart ssh.service; echo $? #=> 0
systemctl --no-legend --all list-units ssh* #=> only ssh.service exists
ssh systemd
When you have modified /etc/ssh/sshd_config
, you may execute systemctl restart sshd.service
to reflect the change. At least in my environment, also, systemctl restart ssh.service
works. And systemctl --all list-units ssh*
tells me there isn't any service with the name sshd.service
. Then why is sshd.service
used wide and actually valid?
(I know the name of ssh daemon is sshd
but this is not the reasonable reason, I think.)
I executed the following commands on linux mint 19
(ubuntu
-base) and volumio 2
(raspbian
-base), both of which are based on debian
.
systemctl restart sshd.service; echo $? #=> 0
systemctl restart ssh.service; echo $? #=> 0
systemctl --no-legend --all list-units ssh* #=> only ssh.service exists
ssh systemd
ssh systemd
edited Sep 5 at 5:55
asked Sep 5 at 5:33
ynn
495
495
There is no ssh.service:Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.
â jasonwryan
Sep 5 at 5:45
ssh is basically termed as a client, and sshd as a server... so sshd is more reasonable
â Bharat
Sep 5 at 5:48
You should state your distribution, Suse uses sshd.service.
â RalfFriedl
Sep 5 at 5:49
@RalfFriedl Thank you. I added the distribution info.
â ynn
Sep 5 at 5:57
add a comment |Â
There is no ssh.service:Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.
â jasonwryan
Sep 5 at 5:45
ssh is basically termed as a client, and sshd as a server... so sshd is more reasonable
â Bharat
Sep 5 at 5:48
You should state your distribution, Suse uses sshd.service.
â RalfFriedl
Sep 5 at 5:49
@RalfFriedl Thank you. I added the distribution info.
â ynn
Sep 5 at 5:57
There is no ssh.service:
Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.â jasonwryan
Sep 5 at 5:45
There is no ssh.service:
Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.â jasonwryan
Sep 5 at 5:45
ssh is basically termed as a client, and sshd as a server... so sshd is more reasonable
â Bharat
Sep 5 at 5:48
ssh is basically termed as a client, and sshd as a server... so sshd is more reasonable
â Bharat
Sep 5 at 5:48
You should state your distribution, Suse uses sshd.service.
â RalfFriedl
Sep 5 at 5:49
You should state your distribution, Suse uses sshd.service.
â RalfFriedl
Sep 5 at 5:49
@RalfFriedl Thank you. I added the distribution info.
â ynn
Sep 5 at 5:57
@RalfFriedl Thank you. I added the distribution info.
â ynn
Sep 5 at 5:57
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
16
down vote
accepted
The ssh service has always been named ssh in /etc/services
, probably whatever the distribution, because it's the SSH protocol, not the sshd
daemon.
Then it made sense, at least in the Debian implementation and thus Debian derivatives, the same name was chosen to start the service as ... service ssh start
which translated into system-V style /etc/init.d/ssh
.
This was kept in systemd, again for consistency since the service can be started indifferently with old style or systemd-style way. Still, an alias is also defined for compatibility with other distributions which made a different choice:
[Install]
WantedBy=multi-user.target
Alias=sshd.service
So both can be used on Debian and derivatives and they represent the same service.
Thank you. Now I understand the structure. As you say, I could find the alias declaration in/lib/systemd/system/ssh.service
.
â ynn
Sep 5 at 6:31
add a comment |Â
up vote
6
down vote
As already established, different names are used in different distributions.
There are valid reasons for both
- The server is called
sshd
, thereforsshd.service
sshd
means "SSH Daemon" or "SSH Server", so "SSH Server Service" would be double.
So it would be a matter of preference of the distro maintainers. These preferences may also change over time, I remember a time when Suse switched from ntp
to ntpd
for the service name.
2
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
16
down vote
accepted
The ssh service has always been named ssh in /etc/services
, probably whatever the distribution, because it's the SSH protocol, not the sshd
daemon.
Then it made sense, at least in the Debian implementation and thus Debian derivatives, the same name was chosen to start the service as ... service ssh start
which translated into system-V style /etc/init.d/ssh
.
This was kept in systemd, again for consistency since the service can be started indifferently with old style or systemd-style way. Still, an alias is also defined for compatibility with other distributions which made a different choice:
[Install]
WantedBy=multi-user.target
Alias=sshd.service
So both can be used on Debian and derivatives and they represent the same service.
Thank you. Now I understand the structure. As you say, I could find the alias declaration in/lib/systemd/system/ssh.service
.
â ynn
Sep 5 at 6:31
add a comment |Â
up vote
16
down vote
accepted
The ssh service has always been named ssh in /etc/services
, probably whatever the distribution, because it's the SSH protocol, not the sshd
daemon.
Then it made sense, at least in the Debian implementation and thus Debian derivatives, the same name was chosen to start the service as ... service ssh start
which translated into system-V style /etc/init.d/ssh
.
This was kept in systemd, again for consistency since the service can be started indifferently with old style or systemd-style way. Still, an alias is also defined for compatibility with other distributions which made a different choice:
[Install]
WantedBy=multi-user.target
Alias=sshd.service
So both can be used on Debian and derivatives and they represent the same service.
Thank you. Now I understand the structure. As you say, I could find the alias declaration in/lib/systemd/system/ssh.service
.
â ynn
Sep 5 at 6:31
add a comment |Â
up vote
16
down vote
accepted
up vote
16
down vote
accepted
The ssh service has always been named ssh in /etc/services
, probably whatever the distribution, because it's the SSH protocol, not the sshd
daemon.
Then it made sense, at least in the Debian implementation and thus Debian derivatives, the same name was chosen to start the service as ... service ssh start
which translated into system-V style /etc/init.d/ssh
.
This was kept in systemd, again for consistency since the service can be started indifferently with old style or systemd-style way. Still, an alias is also defined for compatibility with other distributions which made a different choice:
[Install]
WantedBy=multi-user.target
Alias=sshd.service
So both can be used on Debian and derivatives and they represent the same service.
The ssh service has always been named ssh in /etc/services
, probably whatever the distribution, because it's the SSH protocol, not the sshd
daemon.
Then it made sense, at least in the Debian implementation and thus Debian derivatives, the same name was chosen to start the service as ... service ssh start
which translated into system-V style /etc/init.d/ssh
.
This was kept in systemd, again for consistency since the service can be started indifferently with old style or systemd-style way. Still, an alias is also defined for compatibility with other distributions which made a different choice:
[Install]
WantedBy=multi-user.target
Alias=sshd.service
So both can be used on Debian and derivatives and they represent the same service.
answered Sep 5 at 6:13
A.B
3,5151721
3,5151721
Thank you. Now I understand the structure. As you say, I could find the alias declaration in/lib/systemd/system/ssh.service
.
â ynn
Sep 5 at 6:31
add a comment |Â
Thank you. Now I understand the structure. As you say, I could find the alias declaration in/lib/systemd/system/ssh.service
.
â ynn
Sep 5 at 6:31
Thank you. Now I understand the structure. As you say, I could find the alias declaration in
/lib/systemd/system/ssh.service
.â ynn
Sep 5 at 6:31
Thank you. Now I understand the structure. As you say, I could find the alias declaration in
/lib/systemd/system/ssh.service
.â ynn
Sep 5 at 6:31
add a comment |Â
up vote
6
down vote
As already established, different names are used in different distributions.
There are valid reasons for both
- The server is called
sshd
, thereforsshd.service
sshd
means "SSH Daemon" or "SSH Server", so "SSH Server Service" would be double.
So it would be a matter of preference of the distro maintainers. These preferences may also change over time, I remember a time when Suse switched from ntp
to ntpd
for the service name.
2
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
add a comment |Â
up vote
6
down vote
As already established, different names are used in different distributions.
There are valid reasons for both
- The server is called
sshd
, thereforsshd.service
sshd
means "SSH Daemon" or "SSH Server", so "SSH Server Service" would be double.
So it would be a matter of preference of the distro maintainers. These preferences may also change over time, I remember a time when Suse switched from ntp
to ntpd
for the service name.
2
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
add a comment |Â
up vote
6
down vote
up vote
6
down vote
As already established, different names are used in different distributions.
There are valid reasons for both
- The server is called
sshd
, thereforsshd.service
sshd
means "SSH Daemon" or "SSH Server", so "SSH Server Service" would be double.
So it would be a matter of preference of the distro maintainers. These preferences may also change over time, I remember a time when Suse switched from ntp
to ntpd
for the service name.
As already established, different names are used in different distributions.
There are valid reasons for both
- The server is called
sshd
, thereforsshd.service
sshd
means "SSH Daemon" or "SSH Server", so "SSH Server Service" would be double.
So it would be a matter of preference of the distro maintainers. These preferences may also change over time, I remember a time when Suse switched from ntp
to ntpd
for the service name.
answered Sep 5 at 6:03
RalfFriedl
3,7001523
3,7001523
2
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
add a comment |Â
2
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
2
2
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
See also unix.stackexchange.com/a/303302/5132 / askubuntu.com/a/856645/43344 for another commonly encountered set of differing service names.
â JdeBP
Sep 5 at 6:54
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f466916%2fwhy-not-ssh-service-but-sshd-service%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
There is no ssh.service:
Failed to restart ssh.service: Unit ssh.service not found
, unless your distro symlinks it.â jasonwryan
Sep 5 at 5:45
ssh is basically termed as a client, and sshd as a server... so sshd is more reasonable
â Bharat
Sep 5 at 5:48
You should state your distribution, Suse uses sshd.service.
â RalfFriedl
Sep 5 at 5:49
@RalfFriedl Thank you. I added the distribution info.
â ynn
Sep 5 at 5:57