Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.
When you start the SSH service Linux an ECS instance server, an error message similar to the following is displayed in the command line or Secure log.
fatal: Cannot bind any address.
address family must be specified before ListenAddress.
The AddressFamily parameter of the SSH service specifies the protocol family to be used at runtime. This issue may occur if only IPV6 is used in the configuration but IPV6 is not enabled in the system or the IPV6 protocol is not configured effectively.
In this document, as well as the system configuration and its description in CentOS 7.6 64 bit operating system test. The operating system configurations of other versions may be different. For more information, see the official documentation of the operating system.
Alibaba Cloud reminds you that:
- Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- If you modify the configurations and data of instances including but not limited to ECS and RDS instances, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted security information such as the logon account and password in the Alibaba Cloud Management console, we recommend that you modify such information in a timely manner.
The resolution steps are as follows.
- Enter the system through the management terminal.
- Run the
catcommand to check whether
/etc/ssh/sshd_configcontains a configuration similar to the following.
Note: common parameters are described as follows.
inetuses IPV4 protocol family, which is the default value.
inet6uses the IPV6 protocol cluster.
anyboth IPV4 and IPV6 protocol clusters are enabled.
an editorsuch as vi to set the parameter value to
inet, or delete the entire object or comment out an annotation (adding
#Number) configuration throughout the row, the operation is similar to the following.
# AddressFamily inet
Note: Make sure that the AddressFamily parameter is set before