src/ssh-honeypot.c
/* handle_ssh_auth() -- handles ssh authentication requests, logging
 *                   -- appropriately.
 */
- handles ssh authentication requests, logging
appropriately.
- handles ssh authentication requests logging appropriately .
int handle_ssh_auth (ssh_session session) {
  ssh_message message;
  char *ip;
  ip = get_ssh_ip (session);
  if (ssh_handle_key_exchange (session)) {
    log_entry ("%s Error exchanging keys: %s", ip, ssh_get_error (session));
    return -1;
  }
  for (;;) {
    if ((message = ssh_message_get (session)) == NULL)
      break;
    if (ssh_message_subtype (message) == SSH_AUTH_METHOD_PASSWORD) {
      log_entry ("%s %s %s",
		 ip,
		 ssh_message_auth_user (message),
		 ssh_message_auth_password (message));
    }
    ssh_message_reply_default (message);
    ssh_message_free (message);
  }
  return 0;
}
int handle_ssh_auth ( ssh_session session ) { ssh_message message ; char * ip ; ip = get_ssh_ip ( session ) ; if ( ssh_handle_key_exchange ( session ) ) { log_entry ( " " , ip , ssh_get_error ( session ) ) ; return -1 ; } for ( ; ; ) { if ( ( message = ssh_message_get ( session ) ) == NULL ) break ; if ( ssh_message_subtype ( message ) == SSH_AUTH_METHOD_PASSWORD ) { log_entry ( " " , ip , ssh_message_auth_user ( message ) , ssh_message_auth_password ( message ) ) ; } ssh_message_reply_default ( message ) ; ssh_message_free ( message ) ; } return 0 ; }
handle_ssh_auth() -- handles ssh authentication requests, logging
                   -- appropriately.
handle_ssh_auth () -- handles ssh authentication requests logging -- appropriately .