Host key information and connection information

Jan 18, 2012 at 4:31 PM
Edited Jan 18, 2012 at 4:39 PM

Hi !

Is it possible to get the host key information ?

I mean, when I receive the HostKeyReceived event, I want to provide some information to my users. I have the FingerPrint,
and I have managed to retrieve the Host key algorithm, with the help of the source, but I'm unable to get the size (1024, etc...).

How can I get it ?

Is it also possible to get more information about the connection. In the connection info object I have lots of information, but I'm trying to get the information about what is currently in use.
Like the key exchange, session encryption, MAC, compression ?

Thank you ! 

Coordinator
Jan 20, 2012 at 1:40 PM

Hi,

 

As far as size then you can calculate it from the key itself.

if its 128 bytes then its 1024 bit if 256 then 2048 etc'.

 

As far as additional information about the connection, its possible, I just never had any request to expose this time of information.

Can you open a issue for this, so I dont forget to get back to it, as I dont have much time this days :(.

 

Thanks,

Oleg

Coordinator
Jan 24, 2012 at 1:51 PM

Hi,

 

I just checked in a version where I added "Current*"  properties to ConnectionInfo class which describes currently used encryption, hash algortihm etc'.

 

Hope it helps,

 

Thanks,

Oleg

Jan 25, 2012 at 7:47 PM

Hello !

Thank you very much, it was exactly what I needed !

Sorry, I didn't add an issue, I was not near a computer this last days.

Thank you again!

Feb 20, 2012 at 11:44 AM

Hello again !

I use the same post, since the problem is related.

I'm still unable to get the key size from the host key, but my key is never of 128 or 256 or more.

For exemple, right now the HostKey I receive in the event, it about 434bytes, which contains the Algorithm name, etc...
but i'm unable to find something explaining how to retrieve the hostkey strength (ie: 1024, 2048 etc..) from this.

Do you have any idea ?

Thank you ! 

Coordinator
Feb 21, 2012 at 1:12 PM

Well, its possible to extract the key from the host key.

 

I will have to dig into figure out how and where to expose it, I have algorithm for it already working somewhere internally

 

Meanwhile, can you open it as feature request so I could get back to it when I have more time?

 

Thanks,

Oleg