Logging the suggested algorithms of the client during key exchange

ssh at bunten.de ssh at bunten.de
Sat Jul 2 16:45:07 EST 2011


Hello,

for a research project I am trying to log the algorithms suggested by the 
client during key exchange.

I am using the source of version 5.8p2. I figured the function 
kex_buf2prop() in kex.c might be the place to log that information. I am 
calling logit() within the for loop ->

         for (i = 0; i < PROPOSAL_MAX; i++) {
                 proposal[i] = buffer_get_cstring(&b,NULL);
                 debug2("kex_parse_kexinit: %s", proposal[i]);

                 if (first_kex_follows != NULL) {
                          logit("[client prop] kex %i: '%s' from %s",
                                  i,  proposal[i], get_remote_ipaddr());
                }
         }

Unfortunately, it does not log anything when run as a daemon. Only when 
run in debug ('-d' switch) I see the output. I used logit() in other parts 
to add logging and it works great.

My question: What am i doing wrong and how can I log the proposed 
algorithms properly?

(Please note: I am interested in the suggestions from the client and not 
the ciphers client and server finally use!)

Any helpfull suggestion appreciated!

Regards
Andreas


More information about the openssh-unix-dev mailing list