The above error troubles you sometimes while doing multiple transfer via Cpanel to Cpanel server, Usually there is no such predefined script in cpanel to fix this issue. You need to make sure certain things while doing the transfers.
1.) If you are using custom SSH port make sure its added in the firewall both source and destination server. I will recommend using port 22 while doing the transfer and later change it back once the job is done.
2.) Make sure UsePAM yes should be UsePAM no
3.) Update cpanel to stable version
4.) If you still get errors , Try to stop firewall and reset the root password again. Then issue a pwconv command on the shell to sync the passwords in shadow file.
5.) Choose the correct Remote server type for ex. WHM 11.23+
6.) Provide the correct root password in the transfer window and click fetch account list.
With the above checklist we managed to migrate one server successfully.