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文件系统中不存在。