Got freeSSHd (mostly) working

Well, after my dismal failure yesterday, I mostly got FreeSSHd working. Not sure if it was worth the effort or not, but we'll see.

Turns out the problem was with my expectations. Or maybe I can blame it on the (extremely) minimal documentation. You see, I said "yes" when asked if I wanted to run freeSSHd as a Windows service. Now, I figured that starting the freeSSHd program in the start menu while the service was running would allow me to configure that service and view its status. Yeah...not so much. Apparently running the config program actually tries to start another instance of freeSSHd. Hence why I was getting errors that the the port was in use. It was already being used by the service and I was unwittingly trying to spawn another instance.

It turns out that to configure the service, I need to start the config program, do my stuff, close the config program, and restart the service. At least, that seemed to do the trick - I'm not actually sure how much of it was necessary. After that, freeSSHd ran quite nicely.

My one remaining problem was authentication. I wanted to use NT authentication, which freeSSHd gives as an option. The problem was, it didn't quite work. After creating a user and setting it to NT authentication, I was able to log in...and that's it. I connected with Putty, entered my password, and freeSSHd immediately disconnected me. No warnings, no errors, nothing in the logs - just immediate disconnection.

The really odd thing was that NT authentication worked just fine if I ran freeSSHd by starting the config program rather than as a service. Running it as service, though, disconnected every time. The only time it didn't was when I disabled the "new console" option. Then the session would just hang and not accept input, which wasn't an improvement. I tried various settings and Googled fruitlessly, but no luck. I still have no idea what was going on. After mucking about with this for probably an hour and a half, I finally gave up and changed my freeSSHd user to use a SHA1 hashed password. That worked just fine, but feels like defeat.

The one thing I do like about freeSSHd so far is that it allows you to select your command shell. You actually get a native Windows shell instead of being forced into Cygwin weirdness. I changed mine from the default cmd.exe to PowerShell. That should make for a more pleasant experience.

You can reply to this entry by leaving a comment below. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Related entries

Comments #

    No Subject

    I believe you have to grant the freesshd service access to create system tokens.

    Run gpedit.msc (or apply group policy from the directory)

    replace "sshd" with whatever account the process is running as, the default is SYSTEM

    Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment

    Access this computer from the network -> add sshd
    Act as part of the operating system -> add sshd
    Adjust memory quotas for a process -> add sshd
    Allow log on locally -> add sshd
    Create a token object -> add sshd
    Create global objects -> add sshd
    Log on as a service -> add sshd
    Replace a process level token -> add sshd

    No Subject

    Thanks so much; this was the final thing I tried before I basically gave up getting OpenSSH sshd to work on Windows, but it did the job. Great bit of advice.

    No Subject

    I have been having the exact same issues. For a few years actually.
    Just set out to see if I could fix things and read this post - it's good to know I'm not alone.
    The weird part is that SFTP login works just fine using NT authentication.
    Well, I guess it's not that weird since the problem is coming from spawning a shell.
    What is weird is that years later, FreeSSHd still has the exact same issue.
    I guess I'll try W. Strucke's fix.
    Thanks for posting.

    freesshd on windows 64bit fix

    unexpected close of putty window when loging in. Fix
    1: Stop and Disable Freesshd windows services.
    2: copy and paste the following in a .reg file

    Windows Registry Editor Version 5.00

    "sshd"="\"C:\\Program Files (x86)\\freeSSHd\\FreeSSHDService.exe\""

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.