|
Creating a SFTP Server on Windows
Written by Anthony Lee
Originally written on November 27, 2005
Posted on July 10, 2006
Requirements
OpenSSH for Windows
This tutorial will guide you through setting up a SFTP (Secure FTP) server
on Windows. That’s right! It’s a SFTP server and NOT a FTP
server. What’s the difference and why should you use SFTP instead
of FTP? Why is SFTP better than FTP? These are probably some of the questions
you might ask when reading this tutorial. Despite the similarity in name,
these two protocols are completely different. In FTP, all data being passed
between server and client uses no encryption. Thus, makes it possible
for evesdroppers or hackers to listen in and retrieve your confidential
information. However, with SFTP, all data is encrypted before it is sent
across the network.
I do not want to go into details about SFTP and FTP. If you are very
interested and want to know more on SFTP and FTP, I strongly recommend
you do a Google search on both protocols.
Since Windows does not have SFTP capability built in, you’ll need
third party software. In this case, I used OpenSSH for Windows 3.8.1.
You can download it from http://sshwindows.sourceforge.net
and it's completely free.
Before installing OpenSSH, create a new folder on your C: drive and name
it whatever you want. In this tutorial, I name the new folder UnixBox.

Then go to Computer Management in your Windows machine,
select Users under Local Users and Groups.
Here is where you'll want to create a user to connect to your SFTP server.
In this case, I created a username UnixBox with the password
of 12345. Make sure you also check “User
cannot change password” and “Password never
expires.”


Now that we have the user created, let's set its home directory by going
to the Properties of the user “UnixBox.”
In the Local Path, type in the path where the UnixBox
folder was created. In this case, I created it in C:\UnixBox.
Afterwards, go back to the C: drive or directory you created the folder
call “UnixBox” and give it full contro permissionsl, so the
user can write to the folder. Hence, file uploads.
Now that we have taken care of username, password, and home directory,
go ahead and download OpenSSH
if you haven’t already done so.
Once OpenSSH is downloaded, you’ll need to install it. (Make user
you have admin rights to download and install on Windows). During installation,
make sure that Client and Server are both checked. The rest are optional.
Continue the installation and select the directory you want OpenSSH to
be installed. You’ll get a message window about making /etc/passwd
file etc, just click OK out of it and finish the installation.
When the installation has been completed, open up a command prompt and
go to the folder path of OpenSSH. Type in the following commands.
mkgroup –l >> ..etc/group
mkpasswd –l –u unixbox >> ..etc/passwd
Now that your SFTP server has been created, you’ll need a FTP client
that can do SFTP. I use WinSCP
but you can use whatever you prefer.
To test it, I launch my SFTP client and fill in the information to the
SFTP server and login.
I would actually get a “USAGE WARNING" banner.
As I continue, it takes me to the home directory I created for user unixbox
which is “UnixBox”. It also allowed me to upload this tutorial
to the server.
There you have it. Now you can create a SFTP server on Windows and have
your files securely transferred over the network.
Any questions or comments can be posted to the forum.
|
This page has been viewed 11,619 times |
|