I want to copy some file to a remote Linux system from my Windows PC using pscp (from putty). I wrote a small script that call the pscp commands in this way:
Use putty to set up a remote login without a password. This will involve the puttygen command. You will need a private key and the target will need a public key. Once you verified that you have a good private key file and login without typing a password, you can reference it with the "-i" private key option on pscp. You might be able to set up the key without the putty connect if it isn't allowed, but this is the easiest way. Just say no to passwords in the clear:
C:\Users\riglerjo>pscp -i .ssh\rigler_rsa.ppk test.txt rigler@rigler.org:.
test.txt | 0 kB | 0.0 kB/s | ETA: 00:00:00 | 100%