环境:
系统centos7.6
升级过程:
-
下载openssh最新版本8.0p1, make , make install
-
安装到/usr/local/openssh目录下
-
修改/usr/lib/systemd/system/sshd.service中,相应的可执行文件目录。
-
启动
systemctl daemon-reload
systemctl start sshd
问题:
问题出现了: 卡住了。
长时间没有返回。
等啊等,最后,返回了
查看状态:
systemctl status sshd
有这样的错误:
failed to start openssh server daemon code=exited, status=0/success
分析:
测试:
sshd -t
没问题。
命令行启动:
/usr/local/openssh/sbin/sshd
也没问题。
看来是systemd配置的问题。
看网上资料,
修改:
将
Type=nofify
改为:
Type=forking
并且去掉启动sshd的 -D参数
仍然不行。
sshd的参数 -D是不将sshd转为daemon运行。
<
最低0.47元/天 解锁文章
1526





