Install SFTP server Windows


No votes yet.
Please wait...

If you want to turn your Windows based system into a SecureFTP server, you should read this tutorial of how to install SFTP server Windows.

Some important notes before going to install SFTP server Windows:

Install SFTP server Windows1

 

 

What is the SFTP?

Of course you must have a background about SFTP server before you install SFTP server Windows. So, SFTP “SSH File Transfer Protocol” or a Secure File Transfer Protocol is a network protocol which provides file access, file transfer, and file management functionalities over any reliable data stream. It was released as an extension of the Secure Shell protocol “SSH” version2.0 by the Internet Engineering Task Force “IETF” in order to provide secure file management functionalities and capabilities.

The IETF Internet Draft states that in spite of description of this protocol in the context of the SSH-2 protocol, it could be used in a lot of various applications, such as secure file transfer over Transport Layer Security (TLS) and transfer of management information in VPN software programs.

You can install SFTP server Windows and other platforms. This protocol assumes that it is run over a secure channel, such as SSH, that the server has already authenticated the client, and that client user’s identity is available to the protocol.

SFTP Server:

There are many of SFTP server software for UNIX, Windows and z/OS. The most common one is OpenSSH to install SFTP server Windows, but there are also proprietary applications. Basically 22 is the port number used. SFTP file transfer protocol is part of SSH protocol suite.

What is SSH? How can I use it to install SFTP server Windows?

SSH:

Secure Shell (SSH) is software that allows you to log into another computer over a network, you can use SSH to execute commands in a remote computer, and transfer files from between different machines. It also provides strong authentication and secure communications over insecure channels. While you use SSH to install SFTP server Windows, the entire session of login is highly encrypted of course including transmission of password. So, it is one of the best VPN protocol to secure your internet connection with your new virtual IP address.

What the biggest benefit from using SSH to install SFTP server Windows?

While you want to install SFTP server Windows, this Secure FTP uses SSH to transfer files because SSH encrypt all forms of transmission including passwords and sensitive information but in the standard FTP, there is no encryption for such sensitive information. So, to install SFTP server Windows, you will need to use SSH.

In Unix based operating systems, you can connect to a remote host easily because SSH is preinstalled by default, but if you want to install SFTP server Windows, you will need to enable SSH first, so you can make use of many of SSH, OpenSSH programs to enable SSH client and server on your system such as PUTTY for windows.

First thing, download the Binary Installer Release from SSH Windows. While you finished downloading, install it and be sure to enable both the client and server components.

Configure SSH server to install SFTP server Windows:

Install SFTP server Windows

I have summarized the information that is included with the readme.txt that is included with SSHWindows (it can be found in c:\program files\openssh\docs)

  1. Set up the passwd file. You will need to set up the passwd file before any logins can take place.

You can create passwd easily via two programs “mkgroup and mkpasswd”. Both of these programs are located in the c:\program files\openssh\bin directory included with SSHWindows.

  1. Open a command prompt window and navigate to the c:\program files\openssh directory to create the group and passwd files.

First create the group files, to add all local groups on your computer to the group file, type the following command:

mkgroup -l >> ..\etc\group

Now create a passwd file. Any users in the passwd file will be able to log on with SSH. So, it is recommended that you add users individually with the -u switch. To add a user to the passwd file type the following command:

mkpasswd -l -u username >> ..\etc\passwd

 

NOTE: the username specified above must be an existing windows login account.

  1. Creating Home Directories for your Users
  2. In the passwd file, you will find that the user’s home directory is /home/username, with username being the account name. By default installation, the /home directory is for all users. This is usually c:\documents and settings.

In the case you want to change this location you will need to edit the passwd file. You can edit it in Notepad or any text editor. The last two entries for each user are safe to edit by hand. The second to last entry (/home/username) can be replaced with any other directory to act as that user’s home directory. It’s worth noting that when you run SSH on windows, you are actually running SSH in a scaled down version of Cygwin, which is a UNIX emulator for Windows.

So, if you will be placing the user somewhere outside the default directory for their Windows profile, you will need to use the cygdrive notation.

To access any folder on any drive letter, add /cygdrive/DRIVELETTER/ at the beginning of the folder path. For example, to access the winnt\system32 directory on the *c:* drive you would use the path:

*/cygdrive/c/winnt/system32*

How to install SFTP server Windows:

You will need to download an FTP client that supports SFTP. You can use Filezilla or WinSCP, both of them are free FTP and SFTP clients. And do not forget, running SSH is an important thing to install SFTP server Windows.

To test if you install SFTP server Windows well, create a new connection in your client and make SFTP as the server type, type 22 as the port number, and localhost or 127.0.0.1 for the server name. You will also need to provide the user account and password for any account that you added to your passwd file. Now connect to the server.

If all went well, you should see a directory listing where you referred the home folder to. If not; you must check two things, first one Make sure your Windows firewall is set to allow traffic over port 22 and second thing double check your passwd file to make sure that the account you added exists.

What about security and privacy?

You can restrict access based upon NTFS file permissions due to the SSH permission to the only added accounts for Windows. As such, SFTP does not provide for chroot jails “a UNIX method for locking a user to his/her home directory”. So, lock down your file system for that user, and SFTP will respect that.