Help Center/ Server Migration Service/ FAQs/ Known Errors and Solutions/ SMS.3803 The Connection to the Port 22 of Target Server Failed, Because an Error Occurred During the Public Key Verification on the Target Server
Updated on 2025-07-30 GMT+08:00

SMS.3803 The Connection to the Port 22 of Target Server Failed, Because an Error Occurred During the Public Key Verification on the Target Server

During a migration, an SSH connection must be established between the source server and the target server. This error message is displayed when the SSH client reports error "BadHostkeyException", indicating that the public key in the known_hosts file fails to be verified. The possible causes and solutions are:

  • Security software or firewalls may block the connection from the source server to the target server.
    • Check the firewall settings of the source server and ensure that no outbound traffic is intercepted. If the traffic is blocked, enable the involved ports and try again.
    • Check whether there is security software running on the source server. If there is, disable the security software, stop related services if necessary, and try again.
  • The IP address of the target server is changed after you configure the target server in the migration task or the full migration is complete.

    The source server cannot identify the changed IP address of the target server. As a result, the authentication fails. You can delete the current task and create a new one, or change the IP address of the target server back to the original one.

  • Packet loss occurs when the target server obtains ECS metadata.

    In certain regions, such as AF-Johannesburg and AP-Jakarta, the target server may fail to obtain ECS metadata. In this case, you are advised to change the target server and perform the migration again.

  • The migration is executed using a private network, and there is an IP address conflict between the source and target servers.

    The source server may fail to access the IP address of the target server if there is an IP address conflict between them. Check and modify the network configuration, ensure that the IP addresses do not conflict, and then try the migration again.