Transferred from: http://blog.163.com/ls_19851213/blog/static/531321762009815657395/
Windows XP to build an SSH-based sftp server, server can be used freesshd,f-secure server, etc.,FileZilla server is not available, before the silly with Filez Illa to do the server, can not find any configuration options for SFTP, recommended with freesshd, free, simple, intuitive, the client may use the general support SFTP can,FileZilla,F-Secure Client and so on, I use freesshd and Filezillazilla to build sftp service, I built in the network, if the external network release, firewall to do an address mapping. About ssh,sftp can be online to find the introduction, anyway is encrypted secure transmission of data.
The configuration is very simple and intuitive, with a good listening IP address and port (the default port is 22, it is recommended not 22 ports, the Internet is often scanned 22 port,ssh weak password attack), in the users to establish user accounts,host Restrictions can be simple to the client can access the IP address restrictions, there are white list and blacklist two modes,logging record txt format of the log, online usersdisplay the current online users. the SFTP option is set to the home directory of SFTP.
Focus on certification,FREESSHD support two ways of authentication,password and public key, you can use either of them, you can also require the client to perform both authentication, that is, if two are set to Required, the client must have both a password and public key to connect to the server . are set to allowed, any kind of authentication can enter the server. The first kind of authentication is simple, as long as the client input user name and password can be, the second requires a pair of keys (public and private keys, private key client hold, public key to the server, the figure of Public key folder is to hold the private key corresponding to each client).
Generate key pair of tools, recommended to use a tool called Putty Software, run the software under the Puttygen.exe, such as, click Generate, press the action prompt to move the mouse in the blank, save the public key and private key file , Note: The public and private key names are identical to the user name, for example, the user name is Jane, and the public and private key filenames are Jane,JANE.PPK. The public key is placed in the pulic key folder under Freesshd, and the private key is used by the client.
About the client FileZilla: Open the Site manager, fill out the site information to be connected and user name and password, if the public key authentication (public key authentication, the user name that column is to fill, the password is not required), you need to add in the SFTP option Putty generated by the private key file (here, I made a mistake, put the private key file in a Chinese directory, has not worked, and later placed in an English folder can be, it seems that the foreigner's software or English support is better) so, the whole sftp was built, Public key authentication method, server and client key exchange can also use putty under the pageant implementation, the private key added to the pageant key list can be.
Note: be aware of the Windows folder operation permissions when setting up.
SFTP build @windows using Freeshhd&filezilla