On Thu, May 20, 2010 at 11:36 PM, Kip Lehman <kleh...@medvantage.com> wrote:

>
>
> Partial success.  Thanks to Norman for the info that the username must be a
> valid non-empty value.
>
> However, after passing the username, I still had issues.
>
> I tracked this down to the transport.connect(user=username,
> password=password, pkey=pkey) statement.
>
> I had to leave out the password keyword arg to get this to work (which of
> course in retrospect makes perfect sense).
>
> So, with a valid non-empty user name and a valid DSS key, the statement
> that worked is:
>
> transport.connect(user=username, pkey=pkey)
>
>
>
> But, this doesn't check the hostkey value coming back from the remote
> server.
>
>
>
> So, I'm still looking for ways to convert a puttygen generated/compatible
> hostkey into OpenSSH format.
>
> I saw some code that converts an OpenSSH form into a form suitable for
> stuffing into the Windows registry, but I need to go the other way.
>
> I have the hex value for a hostkey that got placed into the Windows
> registry.
>
>
>
> What is available to convert that hex value into one that could be passed
> to the transport.connect(hostkey=<hostkey>, ...) call such that the hostkey
> returned from the remote server would compare equally to a valid Windows
> registry hex value for the host?
>
>
>
so looking at my saved host keys in my registry:

key: r...@22:hostname
value: 0x23,0xa34d7c...long...binary...value....6899320c4bf1

It looks like this is the e and n values of a RSAKey object, you could
eval() the text and pass the values as a tuple to vals for RSAKey.


> Thanks in advance,
>
>
>
> Kip Lehman
>
> klehman<at>medvantage.com
>
>
>
> _______________________________________________
> paramiko mailing list
> paramiko@lag.net
> http://www.lag.net/cgi-bin/mailman/listinfo/paramiko
>



-- 
- Norman Rasmussen
- Email: nor...@rasmussen.co.za
- Home page: http://norman.rasmussen.co.za/
_______________________________________________
paramiko mailing list
paramiko@lag.net
http://www.lag.net/cgi-bin/mailman/listinfo/paramiko

Reply via email to