Link to home
Start Free TrialLog in
Avatar of mklippel
mklippelFlag for United States of America

asked on

OpenSSH setup on Windows 2003

I'm working on a project where a client needs to send us files using sFTP. The web server in my DMZ is running Windows 2003 and since Windows doesn't support sftp or ssh I researched and found OpenSSH. I've installed OpenSSH onto my server and ran the mkgroup and mkpasswd commands to get things started. When using PuTTY to test my SSH server all I get is Access Denied. I'm using PuTTY on a different box to test access to the SSH server. What am I missing? I've searched all over the place and have tried several solutions without any success. I first want to make sure SSH is functional before trying sFTP but if a solution can cover that even better.

Thanks,

Mark
Avatar of theras2000
theras2000
Flag of United States of America image

I think that you need to login in using a valid Windows user a/c.  Not sure if a domain a/c works, so just create a local account administrator to start with.
Maybe it also needs to be part of the Remote Users group, on the server.
Have you got any sort of firewall on the server?  Port 22 needs to be open for SSH.
Avatar of mklippel

ASKER

I've tried with a local account on the server without any luck. I tried adding the account to the remote users group but that doesn't help.
Hmmm I don't remember it well enough.  I'll install it now and have a go.
ASKER CERTIFIED SOLUTION
Avatar of theras2000
theras2000
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'll reinstall and see what happens. I disabled the AV to make sure that it wasn't getting in the way. The firewall is disabled on the server itself so that is not an issue.
Some progress has been made. I reinstalled, rebuilt the group and passwd file and can now log in as administrator. Now the bigger question. I need to setup a local user to have access to a directory for sftp. Currently the user is created and a password has been assigned. When trying to connect using PuTTY I get the access denied message. I'm sure this has to do with permissions somewhere. I'd like to target the user's home directory to a different location for sftp files.
Well I must admit I don't have any experience with the sftp part of this setup.
But, this seems like a perfect little guide http://www.digitalmediaminute.com/article/1487/setting-up-a-sftp-server-on-windows
Read down at the heading "Creating Home Directories for you Users"
Have a go, and if you're still stuck I'll try it myself and see what I get.
Thanks. I'll check out the article. As a test I added my test user to the local administrator group and I was able to log in so it appears to be permissions. I don't want any sftp users to have admin rights to our server obviously.
Yep that sounds right to me too
Progress! The trick seems to be to give the user the "log on locally" permission and it works just fine. I now have my test user, without local admin right, able to log into the web server using PuTTY and the home folder is now redirected to a different drive and folder for security reasons. I've also testing internally sFTP and it works just fine using FileZilla. I'll test everything externally and work on locking down the file permissions.

theras2000 - you've been an awesome help!

I'll let you know how it turns out in case I run into any issues.
Ahhhhh that makes sense.  I'm so glad you got it.
Hey BTW I'll just share my experience with this.  5yrs ago I setup OpenSSH on my home XP PC, just for fun because I was learning ports and tunnels and remote desktopping.  I'm pretty sure I used this same package, but it was early like v2.1 or something.  I had locked it down to just 1 user with a tight password (and I think tight folder permissions to prevent access to anything but 1 subfolder).  I came home one day and found my traffic maxing out when nobody was using it.  Some investigation of ports etc showed me that files were being sent out via the SSH tunnel to a user who was logged in.  I booted the connection, uninstalled it and have been too scared to touch it again.  Fortunately, at the time my connectoin had already been shaped to 64kbps, so nothing too much could have got out for the 2-3hrs that it had been active.  After some research, I found there was a serious buffer overrun exploit, which had been detected and fixed ages ago on the Unix version but not the Windows one (so I assume this is how they got in).

Anyway, I don't want to alarm you more than is necessary, as this was 5yrs ago, but I just wanted to share my story so you could keep your eyes open for patches and monitor the connections.  You seem to know way more than I did at the time about permissions, so I reckon you'll be fine.