Zend certified PHP/Magento developer

Zip file corrupted after SSH file transfer

I’m trying to zip up some files on my Windows laptop, then transfer them to my Ubuntu server, and unzip them there, but I always get an error while unzipping the archive telling me that the archive is corrupt.

I’ve done some checks, and though the zip files have the same filesize, the SHA256 checksum is different after transferring the files.

I used the following command (on my Windows laptop with using PowerShell):

cat .archive.zip | ssh user@address "cat > ~/archive.zip"

I’m guessing it has something to do with the difference in operating systems, maybe the different line endings. Does anyone know how I can transfer the archive properly?