After changing the port.
And restarting the SSH service, it failed on me.
I got the following info when I ran systemctl status sshd.service:
sshd.service: main process exited, code=exited, status=255/n/a
Unit sshd.service entered failed state.
sshd.service failed.
Any suggestions on how do I fix this (newb here)?
SSH fails after Port change on CentOS 7
-
- Posts: 1
- Joined: 2018/12/23 07:05:10
- Location: New York
- Contact:
Re: SSH fails after Port change on CentOS 7
Try temporaly disable selinux and restart sshd sedvice:
setenforce 0
systemctl restart sshd
systemctl status sshd
setenforce 0
systemctl restart sshd
systemctl status sshd
Re: SSH fails after Port change on CentOS 7
Check the output of:
if it doesn't include your new sshd port then semanage is the command that you use to add it.
Code: Select all
semanage port --list | fgrep ssh