Copy a directory from a server (UNIX) to a PC (Windows)

Hello, I already do some question about this topic. I already establish the conection from the server (Centus) whit the windows PC using SSH. Now I have two problems:

1- The server always ask me about a password to copy the files to the windows pc, I don't know how to avoid this, if someone can explain me how can I do to copy a file from my server (Linux) to my pc (Windows)in an automatic way without the necessity of write the password, please help me.

2- In the way it make the copy, the server only make a a file with the name of the file inside the windows pc, but it file don't have nothing inside, I mean the copied file have size = 0. Someone knows what is happening to my copy?

:confused::confused::confused::confused::confused::confused::confused::confused::confused::confused:

passwordless ssh can be done relatively simply with shared keys, see the link.

I'm less certain what's happening with the empty files, but running scp/sftp with the -b flag may help, it will print verbose debugging information. If you can convince the windows sshd to run with -d for debugging output that may also help explain. I suspect permission issues on the Windows host but that's only a guess.

download the free software "winscp" with GUI interface to make the job easy.