Move the scp transfer to a dedicated method. Update tests.