在Alpine镜像中安装了openssh-server和openssh之后,无法执行ssh localhost。发现未启动服务,开启服务时报以下错误

/ # ls /etc/init.d/sshd
/etc/init.d/sshd
/ # /etc/init.d/sshd status
sh: /etc/init.d/sshd: not found

很明显,sshd这个文件时有的。不能提示not found。通过查阅资料得到以下解决方法

解决方法

安装这个工具

apk add openrc

原来not found时提示脚本第一行的shebang(#!/sbin/openrc-run)找不到。

https://stackoverflow.com/a/39460146/8598438

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2021-11-24
猜你喜欢
  • 2021-09-20
  • 2021-05-22
  • 2022-12-23
  • 2021-08-17
  • 2021-06-12
  • 2021-11-23
  • 2022-02-26
相关资源
相似解决方案