SSHD가 rhel 7.7에서 시작되지 않습니다.

SSHD가 rhel 7.7에서 시작되지 않습니다.

제어 프로세스가 오류 코드와 함께 종료되어 sshd.service에 대한 작업이 실패했습니다.

> -- Unit sshd.service has begun starting up. ctl sshd[4845]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use. ctl
> sshd[4845]: error: Bind to port 22 on :: failed: Address already in
> use. ctl sshd[4845]: fatal: Cannot bind any address. ctl systemd[1]:
> sshd.service: main process exited, code=exited, status=255/n/a ctl
> audispd[584]: node=servername type=CRYPTO_KEY_USER
> msg=audit(xxx.xx:yyyy): pid=4845 uid=0 auid=4294967295 ses=4294967295
> subj=system_u:syste Mar 08 12:07:00 ctl systemd[1]: Failed to start
> OpenSSH server daemon.
> -- Subject: Unit sshd.service has failed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> -- Unit sshd.service has failed.
> -- The result is failed. Mar 08 12:07:00 ctl audispd[584]: node=servername type=CRYPTO_KEY_USER msg=audit(1583669220.759:5500):
> pid=4845 uid=0 auid=4294967295 ses=4294967295 subj=system_u:syste Mar
> 08 12:07:00 ctl systemd[1]: Unit sshd.service entered failed state.
> Mar 08 12:07:00 ctl audispd[584]: node=servername type=CRYPTO_KEY_USER
> msg=audit(1583669220.759:5501): pid=4845 uid=0 auid=4294967295
> ses=4294967295 subj=system_u:syste Mar 08 12:07:00 ctl systemd[1]:
> sshd.service failed. Mar 08 12:07:00 ctl audispd[584]: node=servername
> type=SERVICE_START msg=audit(1583669220.760:5502): pid=1 uid=0
> auid=4294967295 ses=4294967295 subj=system_u:system_r:i [root@server
> conf]# :system_r:init_t:s0 msg='unit=sshd comm="systemd"
> exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=?
> res=failed' M

포트 22에서 수신 대기하는 서비스를 확인해 보았습니다.

netstat -tunlp | grep 22

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1023/sshd

tcp6       0      0 :::22                   :::*                    LISTEN      1023/sshd

tcp6과 tcp가 포트 22에서 수신 대기하고 있는 것을 확인하고 ipv6을 비활성화하려고 시도했습니다.

참조됨이것IPv6을 비활성화했습니다.

/etc/sysctl.conf를 변경했습니다.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

또한 grub을 편집 /etc/default/grub하고 추가했습니다.ipv6.disable=1

재부팅 후에도 포트 22에서 tcp6을 비활성화할 수 없습니다. sshd 시작 문제를 해결하기 위해 무엇을 확인할 수 있습니까?

실행 중인 프로세스 목록

ps -ef | grep sshd
root     1023     1  0 13:15 ?        00:00:00 /usr/share/centrifydc/sbin/sshd -D
root      1899  1023  0 13:15 ?        00:00:00 sshd: ec2-user [priv]
root      1900  1023  0 13:15 ?        00:00:00 sshd: ec2-user [priv]
ec2-user  1994  1900  0 13:15 ?        00:00:00 sshd: ec2-user
ec2-user  1996  1899  0 13:15 ?        00:00:00 sshd: ec2-user@pts/0
root      3282  3268  0 13:22 pts/0    00:00:00 grep --color=auto sshd

Centrify 프로세스를 종료하면 sshd 프로세스를 시작할 수 있었습니다.

고마워요 네이트

답변1

실행 중인 프로세스 목록

ps -ef | grep sshd
root     1023     1  0 13:15 ?        00:00:00 /usr/share/centrifydc/sbin/sshd -D
root      1899  1023  0 13:15 ?        00:00:00 sshd: ec2-user [priv]
root      1900  1023  0 13:15 ?        00:00:00 sshd: ec2-user [priv]
ec2-user  1994  1900  0 13:15 ?        00:00:00 sshd: ec2-user
ec2-user  1996  1899  0 13:15 ?        00:00:00 sshd: ec2-user@pts/0
root      3282  3268  0 13:22 pts/0    00:00:00 grep --color=auto sshd 

Centrify 프로세스를 종료하면 sshd 프로세스를 시작할 수 있었습니다. 해결에 도움을 주신 Ulrich와 Jeff에게 감사드립니다.

관련 정보