就是最后一行加上
Port xxx
服务启动不来
报错信息如下
xxx为22的时候不报错
Sep 13 04:52:39 localhost systemd: Starting OpenSSH server daemon...
Sep 13 04:52:39 localhost systemd: sshd.service: main process exited, code=exited, status=255/n/a
Sep 13 04:52:39 localhost systemd: Failed to start OpenSSH server daemon.
Sep 13 04:52:39 localhost systemd: Unit sshd.service entered failed state.
Sep 13 04:52:39 localhost dbus[724]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Sep 13 04:52:39 localhost systemd: sshd.service failed.
Sep 13 04:52:39 localhost dbus-daemon: dbus[724]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Sep 13 04:52:39 localhost dbus[724]: [system] Activated service 'org.fedoraproject.Setroubleshootd' failed: Failed to execute program /lib64/dbus-1/dbus-daemon-launch-helper: Success
Sep 13 04:52:39 localhost dbus-daemon: dbus[724]: [system] Activated service 'org.fedoraproject.Setroubleshootd' failed: Failed to execute program /lib64/dbus-1/dbus-daemon-launch-helper: Success
Sep 13 04:52:39 localhost dbus-daemon: dbus[724]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Sep 13 04:52:39 localhost dbus[724]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
Sep 13 04:52:39 localhost dbus[724]: [system] Activated service 'org.fedoraproject.Setroubleshootd' failed: Failed to execute program /lib64/dbus-1/dbus-daemon-launch-helper: Success
Sep 13 04:52:39 localhost dbus-daemon: dbus[724]: [system] Activated service 'org.fedoraproject.Setroubleshootd' failed: Failed to execute program /lib64/dbus-1/dbus-daemon-launch-helper: Success
Sep 13 04:53:21 localhost systemd: sshd.service holdoff time over, scheduling restart.
谢谢。网上找了几个案例 和我没有相同点.
检查下iptables selinux