You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

RHEL服务器SSH与HTTPS远程访问异常排查求助

RHEL服务器SSH与HTTPS远程访问异常排查求助

各位大佬好,我遇到一个棘手的服务器问题,想请大家帮忙分析下:

我的服务器运行LAMP栈(httpd、mariadb、php),ssh和web服务都处于运行状态,但远程系统完全无法访问。这个问题是一小时前突然出现的,当时正在使用的ssh连接直接中断,网页也打不开,服务器瞬间无响应。目前我能通过iDRAC登录服务器终端执行命令,但远程访问的问题一直没解决。

我已经做了这些排查,但还是没找到原因:

  • 防火墙排查:firewalld处于活跃状态,已确认http、https、ssh端口都在允许列表里;尝试停止firewalld服务后,问题依然存在。
  • 本地nmap扫描结果:
    • 执行nmap localhost -p 22,显示主机在线,22/tcp open ssh
    • 用服务器自身IP或FQDN扫描nmap xxx.xxx.xxx.xxx -p 22,却提示“Host seems down”
  • 远程nmap扫描结果:
    • 扫22端口:
      acoder@lappy ~ $ nmap my.domain.name -p 22
      Starting Nmap 7.80 at 2022-12-10 08:52 EST
      Nmap scan report for my.domain.name (xxx.xxx.xxx.xxx)
      Host is up (0.014s latency).
      PORT   STATE    SERVICE
      22/tcp filtered ssh
      Nmap done: 1 IP address (1 host up) scanned in 0.29 seconds
      
    • 扫443端口:
      acoder@lappy ~ $ nmap my.domain.name -p 443
      Starting Nmap 7.80 at 2022-12-09 23:59 EST
      Nmap scan report for my.domain.name (xxx.xxx.xxx.xxx)
      Host is up (0.013s latency).
      PORT    STATE    SERVICE
      443/tcp filtered https
      Nmap done: 1 IP address (1 host up) scanned in 0.41 seconds
      
  • SSH连接测试:
    • 本地执行ssh localhost,提示权限拒绝(因为没设置本地密钥,这个是正常情况)
    • 本地执行ssh xxx.xxx.xxx.xxx,返回“Connection timed out”
    • 远程执行ssh -vvv my.domain.name,结果是连接被拒绝:
      acoder@lappy ~ $ ssh -vvv my.domain.name
      OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
      debug1: /etc/ssh/ssh_config line 21: Applying options for *
      debug2: resolving "my.domain.name" port 22
      debug2: ssh_connect_direct
      debug1: Connecting to my.domain.name [xxx.xxx.xxx.xxx] port 22.
      debug1: connect to address xxx.xxx.xxx.xxx port 22: Connection refused
      ssh: connect to host my.domain.name port 22: Connection refused
      
    • 本地telnet测试:
      [acoder@my.domain.name]# telnet localhost 22
      Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.
      SSH-2.0-OpenSSH7.4
      Connection refused by foreign host.
      [acoder@my.domain.name]#
      
  • 其他网络状态:
    • 服务器能正常ssh到其他服务器,说明出站网络没问题
    • 用ethtool em1确认网卡em1有活跃链路灯
    • 能ping通DNS服务器,也能挂载其他服务器的共享磁盘

现在实在想不出还有什么地方没排查到,有没有大佬能指点下方向?

备注:内容来源于stack exchange,提问作者a coder

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 07:34:09