I'm trying to copy a database from one server to another. I tried using the following command and it's getting tied up on entering the ssh passwords. If I put in one server's password, it complains about the other and vice versa.
ssh root@server1 mysqldump --databases db | ssh root@server2 mysql
I managed to do the transfer by holding the dumps temporarily on my computer, just wondering if there is a way to get this to work.