How to go back to stock firmware on wrt1900acs v2

I am trying to use putty to force the reimage of the stock firmware. But the problem is I don't know how to transfer the img file from my computer to the routers tmp file. I am using a Raspberry Pi and putty to access the router. Any ideas would be greatly appreciated