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/
将新增的属性放到报错的属性代码块后面,重启