I am not familiar with Gallery 3, but I have some Perl scripts that I wrote to convert the database of a Gallery 2 installation to Zenphoto.
I zipped up all the folders and images and moved them to the new webserver in their originally named folders, and then used the Perl scripts (using PUtty as you suggest) to transfer the Gallery 2 database details to the Zenphoto database.
I am happy to let you have the scripts - you will probably need to adapt them - if you think it might help.
RichardB