Unsafe symlinks encountered in /var/run/sshd, refusing.

imx6硬件平台,kernel版本为4.1.15:

使用Ubuntu的文件系统版本为 Ubuntu 16.04.6 LTS:具体文件为

ubuntu-base-16.04.6-base-armhf.tar.gz

此文件系统为nfs文件系统,系统启动时ssh启动失败,失败提示错误为:

user@123456:~$ sudo dpkg-reconfigure openssh-server

[sudo] password for user:

debconf: unable to initialize frontend: Dialog

debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)

debconf: falling back to frontend: Readline

Unsafe symlinks encountered in /var/run/sshd, refusing.

Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.

invoke-rc.d: initscript ssh, action "restart" failed.

* ssh.service - OpenBSD Secure Shell server

   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)

   Active: activating (auto-restart) (Result: exit-code) since Wed 2019-09-11 09:20:20 UTC; 60ms ago

  Process: 452 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)

红色字体为错误提示代码。

查看/目录用户属性,切换到根目录/

使用chown root:root /

查看根目录用户属性改为root,再使用如下命令

 

Ssh即可成功启动,此问题在Ubuntu 18.04文件系统中不存在。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值