SMS.3802 Failed to Establish an SSH Connection with the Target Server
Symptom
The migration task failed, and you received the error message "sms.3802 Failed to establish an SSH connection with the target server."
Problem Analysis
During a migration, an SSH connection must be established between the source server and target server. If the SSH connection is not set up, the preceding error message is displayed. You are advised to review the following parts to locate the cause of the SSH connection failure.
- Checking Whether Port 22 Is Allowed in the Security Group of the Target Server and Whether the Source IP Address Is Configured Correctly
- Checking Whether the Target Server Is Stopped
- Checking Whether the VPC or IP Address of the Target Server Is Changed During the Migration
- Checking Whether the Migration Is Performed over a Private Network that Is Not Connected to the Target Server
- Checking the Firewall Settings of the Source Server
- Checking Whether Security Alarms Are Generated on the Source or Target Server or the EIP of the Source or Target Server Is Frozen
- Checking Whether the Public Keys on the Linux Source and Target Server Are the Same
Checking Whether Port 22 Is Allowed in the Security Group of the Target Server and Whether the Source IP Address Is Configured Correctly
- Log in to the management console.
- Under Compute, click Elastic Cloud Server. In the ECS list, click the name of the target ECS.
- On the ECS details page, click the Security Groups tab. Check whether port 22 is opened and whether the source IP address is specified correctly.
If port 22 is not opened in the inbound direction, add an inbound rule for port 22. If such an inbound rule exists but the source IP address is not 0.0.0.0/0 or the IP address of the source server, change the source IP address to 0.0.0.0/0.
For details, see How Do I Configure Security Group Rules for Target Servers?
Checking Whether the Target Server Is Stopped
- Log in to the management console.
- Under Compute, click Elastic Cloud Server. Locate the target ECS and view its status. If the ECS is stopped, choose More > Start in the Operation column.
Checking Whether the VPC or IP Address of the Target Server Is Changed During the Migration
If the VPC or IP address of the target server is changed during the migration, change it back to the original VPC or IP address. Otherwise, you will need to repeat the migration.
Checking Whether the Migration Is Performed over a Private Network that Is Not Connected to the Target Server
Check whether a private network is used for the migration and whether the source and target servers are in different private networks. If yes, use the public network for migration or connect the two private networks.
Checking the Firewall Settings of the Source Server
Check whether the outbound traffic is blocked by the source server firewall. If yes, permit the traffic and continue the migration.
Checking Whether Security Alarms Are Generated on the Source or Target Server or the EIP of the Source or Target Server Is Frozen
Check whether security alarms are generated on the source or target servers or the EIP of the source or target server is frozen.
- If this problem is happening on the source server, contact the source cloud service provider for troubleshooting.
- If this problem is happening on the target server, contact Huawei Cloud for troubleshooting.
Checking Whether the Public Keys on the Linux Source and Target Server Are the Same
During the migration, an SSH public key that matches the target server is generated in the /root/.ssh/known_hosts file on the source server, as shown in the following figure. sms@localhost indicates that the public key is generated by the SMS Agent. {target_ip} indicates the IP address used for migration of the target server.
Compare the public key file with that of the corresponding key pair algorithm in /etc/ssh on the target server. If there is any inconsistent information, delete the corresponding lines from the /root/.ssh/known_hosts file on the source server, delete the migration task, and perform the migration again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.