Do it over one connection :)

Or go even further: http://unix.stackexchange.com/a/57809 send the file and SSH in one command!