How to get freeSSHd public key authentication to work

I was looking for a Windows SSH server implementation to use in conjunction with Mercurial when I stumbled upon freeSSHd. Setting it up was a matter of minutes… except that I could not get public key authentication to work. After countless attempts and many a Google search I eventually solved my problem, thanks to this step by step IBM tutorial.

Unfortunately when used in non-interactive mode freeSSHd doesn’t spawn cmd.exe, which makes it unsuitable for applications that expect their remote counterparts to be on the path.

About these ads

23 Responses to “How to get freeSSHd public key authentication to work”

  1. mikemurko Says:

    Fantastic thanks for the help! For me the trick was that the filename of the public key needs to be exactly = to the username for that key (with no file extension). I was used to using keys ending in “.pub”.

  2. Live Says:

    Still not working for me says

    Server refused public-key signature despite accepting key!

  3. Joel Says:

    Make sure that you use a passphrase when generating your private key. This got around the “Server refused public-key signature despite accepting key” error for me

  4. mikemurko Says:

    Not here to bash FreeSSHd, but I had *so* many problems running it on Windows. The fact that the service and the application conflict with each other means that getting it to auto-start was extremely difficult (important if your main access to the server is SSH). Also, bugs galore in terms of administration …. so I wouldn’t doubt some security bugs as well.

    My final solution was to install OpenSSH on an Ubuntu machine. Took much less time to set up. Had to punch in a few commands into the terminal, configure one config file, and I was away. Much, much, much easier. Not to mention larger community, stable product, logs are integrated into your auth.log, and tunneling worked out of the box.

    Don’t be afraid of Linux! It’s easy peasy lemon squeezy!

  5. gg Says:

    I tryed the procedure in ibm document but i get:

    Server refused public-key signature despite accepting key!

  6. Olav Says:

    Thanks, the IBM document described it very well. BUT befor it worked for me I had to restart the freeSSH Server

  7. arian Says:

    I was getting the “Server refused public-key signature despite accepting key!” message as well, however this went away after I ran FreeSSHd as an administrator. (This was on Windows 7)

    Also make sure you have a passphrase set on your privatekey.

  8. Vaiads Says:

    I would saved so much time if found it earlier :).. thank a lot, bro.

  9. John Jay Says:

    thanks arian. works for me now

  10. Martin Says:

    Run as administrator helps to the “Server refused public-key signature despite accepting key!” problem.

  11. Takuro Says:

    Or you set the public key folder other than one in C:\Program files. Probably accessing a folder in C:\Program files in the app running as not administrator redirect to somewhere else.

  12. Chandu Says:

    @mikemurko Thanks a ton. I renamed the pub file to match the user name and it worked.

  13. Jeff Says:

    As others have said “THANK YOU”. I have been struggling with how to get the SSH key to work. The link to the IBM doc was just what I needed.

  14. jmward333 Says:

    Brilliant, thank you so much. The IBM document seems to be the only one around that gives you chapter and verse on this.

  15. Frode Says:

    Thanks for this thread. Along with this YouTube clip It helped me get connected:

    I tried everything, but in the end I think what made the difference was using notepad to save the public key generated from Puttygen (don’t use Save public key button in PuttyGen) and manually restarting FreeSSHD after updating the config (It will prompt to restart the server, but it doesn’t seem to work).

  16. mythink Says:

    Thanks not even freeSHH metions how to create the public key file. I got it up and working with no passphrase since need to login automatically with no user interaction.

  17. tgaw Says:

    Thanks for your post. I found it helpful as well.

    • Mark Says:

      I have tried all the suggestions above and still get “Server refused public-key signature despite accepting key!”

  18. Karthik Says:

    It Really worked…Thanks..!!!!!!

  19. Andre Says:

    Hello, I’m hoping someone here can help out. I have everything working and I can successfully login through Putty, but the directory is C:\Windows\System32 and I can’t type anything. It’s frozen. I can successfully Putty into other servers, no problems. My home directory in FreeSSHD is set to C:\Test (I tried D:\Test as well) yet nothing works. Any ideas?

  20. Oliver Says:

    Thanks, Nicola, for writing this post and linking to the step-by-step guide from IBM. The comments are also very valuable.

    After some fiddling around with the different options and suggestions by others, I’ve put together an online guide to get public key authentication in freeSSHd to work. For anyone having problems with the setup, take a look at


  21. Oliver Says:

    @Andre: Could you verify that you’ve checked the SFTP checkbox for the login you’re using to connect to freeSSHd (as seen in this screeshot: If it’s not, that could be the cause of error.

  22. Stephane Bouniol Says:

    Folks, I think I figured it out…
    there is an odd bug in freesshd, sometimes it doesn’t take some of the changes even if your stop it.. you have to actually “unload” it and then restart it as admin…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: