Skip to content
  • Home
  • Programming
  • Life / Philosophy
  • Privacy
My main homepage

SharpSSH problem

Posted on April 19, 2011 by Kjetil H

Recently I encountered a cryptic error while using SharpSSH. The error message on the surface read wonderfully detailed: Auth fail. Appearently authorization failed somewhere in the program. After hours of wasted debugging with the source code it seemed to fail in the SignatureDSA.sign() method just as the DSACryptoServiceProvider called the ImportParameters() method with the DSA key.

Needless to say I was astonished to why the authorization was failing, as I had succesfully connected to a test SFTP server using nearly identical login set up as the production server (same login method: no password, DSA 1024 bits private key etc.). Not only that, I could even login to the production SFTP server without problems using both WinSCP and FileZilla.

All of these factors delayed me in figuring out the real cause and the solution. Well, scratch cause (blame SharpSSH), check solution. Turns out the private key was generated with only 1023 bits (missing one small, but yet so significant bit). This seems to happen quite frequently when using Putty Generator for generating key pairs, so watch out. Make sure it says 1024 bits in the signature summary when generating those key pairs *makes movement with arm thus making the statement more clear*!

Oh and I’m not bashing SharpSSH, it’s a great effort by Tamil and a great product for those of us who don’t want to pay yearly licences for trivial, simple file transfers to a SFTP server.

Hopefully this helped out someone.

Tweet
This entry was posted in Programming and tagged Appearently, authorization, cause, check solution, cryptic error, debugging, DSA, error message, file transfers, ImportParameters, login method, pairs, password, production server, putty, SharpSSH, solution, surface, test, winscp. Bookmark the permalink.
← Stephen Hendry through to last 16
Latest from the Crucible →
  • RSS | Customize
  • Recent Posts

    • How to assign a ringtone to your iPhone 5 from the iTunes Store
    • MVC 2 – Model binding happens automatically for properties not fields
    • HTML/DOM attribute change events and how it can improve maintainability in your web application
    • Google API nightmare: How I fixed the “Could not load file or assembly ‘System.Net.Http.Primitives, Version=1.5.0.0 …” exception
    • How to access array elements of a VBScript class property (returning an array)
    • How to debug an infinite request/loading for an IIS website AND what my problem was
    • How to assign properties to the default ‘Content’ tab with PageTypeBuilder
    • EPiServer: Remember to set a PageName for programmatically created Pages
    • Simple helping function for managing dependencies in JavaScript
    • Possible issue when omitting semi-colons in JavaScript
    • An emotionless state (bedtime notes)
    • How to use the “multiple” attribute with wp_dropdown_pages
    • My acne is gone, have I become a happier person?
    • The illusion of encryption
    • “Hijacking” WordPress plugins
  • Categories

  • Archives

    • September 2014
    • July 2014
    • June 2014
    • February 2014
    • October 2013
    • September 2013
    • July 2013
    • June 2013
    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • October 2012
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
  •  

    album championship chance code course crucible day Death everyone everything Google hand idea information john higgins kind life mark selby moment name nbsp Open Page password Path programming reason right ronnie o sullivan root run search site Snooker snooker world championship solution something sort theory time today type value way Wordpress
  • Terms of Service - Privacy Policy

For enquiries or feedback, both positive and negative, you can reach me on e-mail: kjetil [at] kjetil-hartveit [dot] com.