我要评分
获取效率
正确性
完整性
易理解

"'Match all' with No Other Mixed Conditions" Error During Data Collection

Symptom

During server cluster collection, the SSH connection fails and the error message SSH connection failed. Check that \"Match all\" in the environment variable (/etc/ssh/ssh_config) does not contain any other mixed conditions is displayed.

Probable Causes

The cluster check capability of the Kunpeng Health Inspector relies on Paramiko/Fabric for SSH connections. In newer Linux distributions (such as RHEL/CentOS 8/9 and Ubuntu 22.04 or later), the OS automatically generates the extended "Match final all" syntax. Because Paramiko does not support the final condition syntax, the tool may report an error when establishing an SSH connection.

Handling Procedure

Temporarily modify the SSH client configuration on the collection node (that is, the host on which the Kunpeng Health Inspector is running).

You only need to modify the SSH client configuration on the node that runs the tool. No other nodes need to be modified. Restore the configuration after the collection is complete.

  1. Open the /etc/ssh/ssh_config file.
    vi /etc/ssh/ssh_config
  2. Press i to enter the insert mode and change Match final all to Match all.

    The following is an example of part of the command output before the modification:

    Match final all
            Include /etc/crypto-policies/back-ends/openssh.config

    The following is an example of part of the command output after the modification:

    Match all
            Include /etc/crypto-policies/back-ends/openssh.config

    Press Esc, type :wq!, and press Enter to save the file and exit.

  3. Run the collection task again and verify that the connection is normal.
  4. (Recommended) Restore the configuration after the collection task is complete.

    Edit the /etc/ssh/ssh_config configuration file again to change Match all to Match final all.