The Network Administrator

The weblog of an IT pro specializing in virtualization, storage, servers and networking
  • rss
  • Home
  • About
  • Downloads
  • Contact

Setup Secure FTP (SFTP) With OpenSSH on Windows Server

MWahl | June 5, 2010 | 6:18 pm

Windows Server 2008 IIS7 does have support for SFTP unlike IIS6. We are running Windows Server 2003 so IIS7 was not an option. I looked at Filezilla, the setup does not work work well with enterprise level firewalls, etc.

The most simplistic solution was to just use OpenSSH.

1. First open port 22 to the secure Secure FTP Server ip address and apply any needed access lists or static mappings.

2. Download OpenSSH from http://sshwindows.sourceforge.net/download/ and download the binary installer. Once the software is downloaded, click on the executable file to launch the installer.

3. The installation wizard should come up, select next, accept the license agreement, install the Client and Server components, select the destination path.

4. From your server computer Management Console create a user, and a group. add the user to the group. The User name could be sftp and the group be secftp.

5. Create a directory you want your sftp users to access. I created my on the following path:
E:\sftp\sftp

Make sure the OpenSSH service is not running under services. if it is, stop it, otherwise leave it stopped

6. go to RUN and type Regedit and click OK.
navigate to the following registry folder: HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin expand the Mounts v2 folder, and click on /home right click the native file, and click on modify, and add the path of the directory you want your users to have access to. mine is E:\sftp\sftp

7. Create a file named group and passwrd at the following location and don’t put any extension on them.
C:\Program Files\OpenSSH\etc

8. Click on RUN and type CMD and then OK

type the following command on the command prompt:

cd C:\Program Files\OpenSSH\bin

once you switch to the BIN directory type the following commands:

mkgroup -l >> ..\etc\group

and then:

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

on the username option, add the username we created above.

9. From the command prompt, execute the following command to start the service net start opensshd

10. One last thing to do is modify the passwd file C:\Program Files\OpenSSH\etc

Create home directories for your user

In the passwd file, you will notice that the user’s home directory is set as /home/username. Change the location by editing the passwd file with notepad or any other text editor. Only edit the second last entry (/home/username), by replacing it with any directory that you wish to act as that user’s home directory,

using the following syntax:
/cygdrive/c/path_to_the_folder

Testing,U-2K3FS01\SFTP,S-1-5-21-3837532754-3053635440-2016409431-1003:/cygdrive/c/sftp:/bin/switch

Below is an example of my passwd file entry.
FTP:unused_by_nt/2000/xp:1003:513:SFTP

Comments
1 Comment »
Categories
Secure FTP
Comments rss Comments rss
Trackback Trackback

A few iPhone Tips and Tricks

MWahl | June 5, 2010 | 6:10 pm

1. If you wish to go to the top of any screen without scrolling up just tap anywhere on the status bar.

2, Want a screen shot, just press the home and sleep buttons at the same time while you have the desired screen loaded. The screen shots show up in your camera roll as regular pics.

3. While in any screen you can shake to undo and redo

Comments
2 Comments »
Categories
iPhone, Uncategorized
Comments rss Comments rss
Trackback Trackback

some text

RSS Netcast

  • Increasing your AWS EC2 root partition (Windows) December 14, 2011
  • IIS SSL Certificate into Amazon Elastic Load Balancer December 7, 2011
  • Upgrade an Opsview Appliance August 13, 2011

Categories

  • Activesync (1)
  • Amazon EC2 (5)
  • Amazon S3 (2)
  • Antivirus (1)
  • Blackberry (9)
  • Blackberry Enterprise Server (1)
  • blogs (3)
  • Cisco (6)
  • Citrix Xenapp (2)
  • Databases (2)
  • HTC (1)
  • Internet Explorer (1)
  • iPhone (4)
  • Linux Server (18)
  • Linux tools (11)
  • Microsoft Apps (2)
  • Microsoft Exchange (12)
  • Microsoft Office (1)
  • Microsoft Sharepoint Services (1)
  • Microsoft SQL Server (3)
  • Monitoring (2)
  • MS IIS 6 (1)
  • MYSQL (1)
  • NetCast (3)
  • Networking (19)
  • OpsView/Nagios (1)
  • Photos (1)
  • RAID (1)
  • Scripts (4)
  • Secure FTP (1)
  • Security (10)
  • Smart Phones (1)
  • Tech Preview (8)
  • Uncategorized (40)
  • Virtual Servers (4)
  • Web Browsers (2)
  • Web Server load balancing (1)
  • Web Servers (9)
  • Windows Desktops (17)
  • Windows Server (24)
  • Windows tools (23)
  • WordPress (1)

Recent Posts

  • Increasing your AWS EC2 root partition (Windows)
  • IIS SSL Certificate into Amazon Elastic Load Balancer
  • Upgrade an Opsview Appliance
  • AppAssure Replay First Impressions
  • Linux Boot Process

Archives

Blogroll

  • IT Pro Security Community
  • Jeff Stevenson
  • kevin devin
  • lopsa lopsa
  • MWahl social.microsoft.com
  • Network Security
  • Petri
  • SVROPS
  • Technology blog from bbc
  • technology review
  • THE WAN LAN LORD
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox