linux 服务报错

root@center1:~/douyin/secooqingdao# sudo systemctl enable ssh
Failed to issue method call: No such file or directory

查systemctl 版本是有的

root@center1:~/douyin/secooqingdao# systemctl --version
systemd 204
+PAM +LIBWRAP +AUDIT +SELINUX +IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ
root@center1:~/douyin/secooqingdao# 

但systemctl enable ssh 报错

阅读 1.7k
2 个回答

你为什么需要这样启用ssh

ssh 服务的服务名是 sshd 啊,所以你是想干嘛?你是想让系统自动启动一个你自己写的 ssh 的service 还是想让系统启动启动 sshd 的服务啊?
如果是后者,我所见过的linux 发行版,sshd 服务都是默认启动的啊。。你要不先运行一个 systemctl status sshd 看下输出

推荐问题