
그래서 VM RHEL 8.6 테스트 서버에서 Hyper-V와 관련하여 이상한 문제가 발생했습니다.
문제는 SSH 서비스가 때때로 자정쯤에 중단된다는 것입니다.
서버에 다시 연결하려면 서버가 정지되어 SSH를 통해 로그인할 수 없기 때문에 Hyper-V에서 수동으로 다시 시작해야 합니다.
이상하게도 다른 서비스는 잘 작동합니다. httpd, mysqld 등
Telnet, ping, nmap(포트 22 열려 있음), snmp 응답이 있는데 SSH를 제외한 모든 것이 괜찮아 보입니다.
Nagios 4.4.7이 설치된 경우 SSH 정지가 발생하면 Nagios의 서비스 검사도 중지됩니다.
다른 서버가 있는데 Nagios가 문제의 서버를 모니터링하고 snmp가 잘 작동하며 CPU와 RAM도 괜찮은 것을 볼 수 있습니다.
SSH를 사용하여 로그인하려고 하면 응답이 없습니다. 하지만 디버그 수준에서는 연결되는 것처럼 보이지만 앞으로 진행되지 않습니다.
OpenSSH_6.2p2 (CentrifyDC build 5.1.3-204) (CentrifyDC build 5.1.3-204), OpenSSL 0.9.8w-fips 23 Apr 2012
2023-04-08 12:04:17: debug1: Reading configuration data /etc/centrifydc/ssh/ssh_config
2023-04-08 12:04:17: debug1: /etc/centrifydc/ssh/ssh_config line 48: Applying options for *
2023-04-08 12:04:17: debug2: ssh_connect: needpriv 0
2023-04-08 12:04:17: debug1: Connecting to 10.85.x.x [10.85.x.x] port 22.
2023-04-08 12:04:17: debug1: Connection established.
2023-04-08 12:04:17: debug3: Incorrect RSA1 identifier
2023-04-08 12:04:17: debug3: Could not load "/home/nagios/.ssh/id_rsa" as a RSA1 public key
2023-04-08 12:04:17: debug1: identity file /home/nagios/.ssh/id_rsa type 1
2023-04-08 12:04:17: debug1: identity file /home/nagios/.ssh/id_rsa-cert type -1
2023-04-08 12:04:17: debug1: identity file /home/nagios/.ssh/id_dsa type -1
2023-04-08 12:04:17: debug1: identity file /home/nagios/.ssh/id_dsa-cert type -1
2023-04-08 12:04:17: debug1: identity file /home/nagios/.ssh/id_ecdsa type -1
2023-04-08 12:04:17: debug1: identity file /home/nagios/.ssh/id_ecdsa-cert type -1
2023-04-08 12:04:17: debug1: Enabling compatibility mode for protocol 2.0
2023-04-08 12:04:17: debug1: Local version string SSH-2.0-OpenSSH_6.2
[root@hostname ~]# nmap -sU -p 22 10.85.x.x
Starting Nmap 5.51 ( http://nmap.org ) at 2023-04-08 12:09 BOT
Nmap scan report for 10.85.x.x
Host is up (0.0050s latency).
PORT STATE SERVICE
22/udp open|filtered ssh
Nmap done: 1 IP address (1 host up) scanned in 0.38 seconds
[root@hostname ~]# telnet 10.85.x.x 22
Trying 10.85.x.x...
Connected to 10.85.x.x.
이는 RHEL 8.6을 사용하는 최신 호스트에서 가져온 것입니다.
OpenSSH_8.0p1, OpenSSL 1.1.1k FIPS 25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug2: checking match for 'final all' host 10.85.x.x originally 10.85.x.x
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final'
debug2: match not found
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug1: configuration requests final Match pass
debug2: resolve_canonicalize: hostname 10.85.x.x is address
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug2: checking match for 'final all' host 10.85.x.x originally 10.85.x.x
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final'
debug2: match found
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug2: ssh_connect_direct
debug1: Connecting to 10.85.x.x [10.85.x.x] port 22.
debug1: connect to address 10.85.x.x port 22: Connection refused
ssh: connect to host 10.85.x.x port 22: Connection refused
또 다른 점은 cron 작업도 작동을 멈췄다는 것입니다. 특정 파일이 업데이트를 중지하면 자동으로 다시 시작하는 로컬 스크립트가 있지만 SSH 서비스가 정지되면 실행되지 않습니다.
이는 크론 작업이 실제로 실행되고 있지 않다는 것을 의미합니다. 저는 전문가는 아니지만 이것이 SSH에 의존합니까, 아니면 이러한 작업이 실행되지 않는 이유가 될 수 있는 다른 것이 있습니까?
mysqld, ndo2db를 비활성화했지만 여전히 중단이 발생합니다.
제가 알아낼 수 있도록 어디서부터 시작해야 할지 알려주세요. 하하, 감사합니다!