Unit sshd..service could not be found. Unit service.service could not be found.
时间: 2023-07-01 07:16:32 浏览: 251
It seems like you are facing issues with two different systemd services: sshd and service.
For the sshd service, you can try installing it using the following command:
```
sudo apt-get install ssh
```
As for the service service, it is not clear which specific service you are referring to. Can you provide more information on the service you are trying to use?
相关问题
Unit sshd.service could not be found.
This error message suggests that the sshd service is not installed or is not running on the system. To resolve this issue, you can try installing the sshd service using your system's package manager.
For example, on Ubuntu, you can install the sshd service by running the following command:
```
sudo apt-get install openssh-server
```
Once the installation is complete, you can start the sshd service using the following command:
```
sudo systemctl start sshd
```
You can also configure the sshd service to start automatically at boot time using the following command:
```
sudo systemctl enable sshd
```
I hope this helps! Let me know if you have any other questions.
Unit sshd.service could not be found.错误
这个错误通常是因为 sshd 服务没有安装或者没有启动。你可以按照以下步骤来解决这个问题:
1. 检查 sshd 服务是否已经安装。在大多数 Linux 发行版中,您可以使用以下命令来安装 sshd:
```
sudo apt-get install openssh-server
```
2. 启动 sshd 服务。在大多数 Linux 发行版中,您可以使用以下命令来启动 sshd:
```
sudo systemctl start sshd
```
3. 检查 sshd 服务是否正在运行。在大多数 Linux 发行版中,您可以使用以下命令来检查 sshd 服务是否正在运行:
```
sudo systemctl status sshd
```
如果 sshd 服务正在运行,您应该会看到类似于以下内容的输出:
```
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-09-14 10:55:35 EDT; 2h 14min ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 1234 (sshd)
Tasks: 1 (limit: 4915)
Memory: 5.5M
CGroup: /system.slice/sshd.service
└─1234 /usr/sbin/sshd -D
```
如果 sshd 服务没有运行,您可以使用以下命令来启动它:
```
sudo systemctl start sshd
```
希望这些步骤可以帮助您解决问题。
阅读全文