An attempt to connect and scan the remote server in the WHM interface Transfer Tool returns the following error despite being able to login to the server through command line.
The system failed to update the file "analyze_config_VERSION" on the remote server because of an error: The remote server "X.X.X.X" unexpectedly terminated the connection. The port may be incorrect, or the remote server may not allow connections from this server: lost connection
The Transfer Tool will establish an SSH connection and generate a script used by the tool to populate the remote server's information in the interface. This error can commonly be caused by network communication issues between the source and destination servers that prevent this from completing normally. If you are able to establish an SSH login manually outside of the Transfer Tool, this may indicate a problem with the additional tasks performed by the transfer tool instead.
After establishing the initial SSH connection, the Transfer Tool also performs an SCP command to generate the analyze_config script on the source server. If this task fails with the above error, this can also be caused by a failure in the scp command when run on the source server. It has been found that modified or altered SCP binaries will result in this error.
You can check to verify if the binary has been altered with the following command. If this has been modified, it would need to be restored from the package or reverted to the correct values.
rpmverify openssh-clients | grep -i scp
By default, this binary should have a group and owner of the root user and have access permissions of 755. If these have been modified they can be corrected with the following commands.
chown root. /usr/bin/scp
chmod 755 /usr/bin/scp