You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 23.10安装openssh-server后无法找到sshd.service单元的问题求助

Ubuntu 23.10安装openssh-server后无法找到sshd.service单元的问题求助

大家早上好,

我刚装了Ubuntu 23.10,现在遇到个SSH相关的问题想请教大家。我先是用下面的命令安装了openssh-server:

sudo apt install openssh-server

结果当我尝试执行和sshd相关的操作时,比如:

sudo systemctl start sshd

或者

sudo service sshd restart

系统都会弹出错误提示:

Failed to start sshd.service: Unit sshd.service not found
或者
Failed to restart sshd.service: Unit sshd.service not found

我已经试过好几次彻底卸载重装了,卸载用了这些命令:

  • sudo apt-get remove --purge openssh-server
  • sudo apt purge openssh-server
  • sudo apt autoremove
  • sudo apt remove ssh --purge -y

重装也换了几种方式:

  • sudo apt install openssh-server
  • sudo apt-get install openssh-server
  • sudo apt install ssh -y

但每次都没能解决问题。而且我检查过/etc/ssh/sshd_config这个文件是正常安装存在的。

有没有大佬知道这可能是什么问题?该怎么解决呢?

提前谢谢大家的帮忙!


编辑补充:
这是执行dpkg -L openssh-server得到的文件列表:
(注:原提问中未附上具体文件列表内容)

备注:内容来源于stack exchange,提问作者fede996

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 09:23:02