sshd重启错误:Job for sshd.service failed because the control process exited with error code. See “system

sshd重启错误:Job for sshd.service failed because the control process exited with error code. See “system,第1张

sshd重启错误:Job for sshd.service failed because the control process exited with error code. See “system sshd重启错误:Job for sshd.service failed because the control process exited with error code. See "system

查看报错原因

/usr/sbin/sshd -T


或者

这些错误都是因为新加的sshd配置属性位置不对导致的

修改前:

Subsystem sftp internal-sftp
UsePAM yes
Match user sftpuser1
ForceCommand internal-sftp
ChrootDirectory /data/wwwroot/user1/

UseDNS no
AddressFamily inet
PermitRootLogin yes
SyslogFacility AUTHPRIV
PasswordAuthentication yes

修改后:

UseDNS no
AddressFamily inet
PermitRootLogin yes
SyslogFacility AUTHPRIV
PasswordAuthentication yes

Subsystem sftp internal-sftp
UsePAM yes
Match user sftpuser1
ForceCommand internal-sftp
ChrootDirectory /data/wwwroot/user1/

将新增的属性放到报错的属性代码块后面,重启

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5704708.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存