I changed the DEBUG_TRACE functionality and added a DEBUG_LEVEL setting which allows you to add only a minimum number of messages to dbclient only. By specifying 1 or more -v options you will increase verbosity. 1x -v will show connection, remoteid and auth methods 2x -v will show choosen algos 3x -v will show avalable algos This functionality will increase a static dbclient binary approx with 4kb
example: dev32:~/git/dropbear# ./dbclient -v -v 192.168.1.150 TRACE (13755) 0.000000: user='root' host='192.168.1.150' port='22' TRACE (13755) 0.000108: enter session_init TRACE (13755) 0.010916: remoteident: SSH-2.0-dropbear_2016.74 TRACE (13755) 0.011120: kex algo [email protected] TRACE (13755) 0.011201: hostkey algo ssh-rsa TRACE (13755) 0.011294: enc c2s is aes128-ctr TRACE (13755) 0.011354: enc s2c is aes128-ctr TRACE (13755) 0.011486: hmac c2s is hmac-sha1 TRACE (13755) 0.011518: hmac s2c is hmac-sha1 TRACE (13755) 0.011561: comp c2s is [email protected] TRACE (13755) 0.011585: comp s2c is [email protected] TRACE (13755) 0.107063: enter cli_auth_getmethods TRACE (13755) 0.107875: Methods (len 18): 'publickey,password' TRACE (13755) 0.107948: auth method 'publickey' valid TRACE (13755) 0.108013: enter cli_auth_try TRACE (13755) 0.108096: try auth method publickey TRACE (13755) 0.108132: skip auth method password (not enabled) TRACE (13755) 0.108150: skip auth method interact (not enabled) TRACE (13755) 0.108199: cli_auth_try lastauthtype 2 TRACE (13755) 0.108248: leave cli_auth_try failure TRACE (13755) 0.108313: enter session_cleanup dbclient: Connection to [email protected]:22 exited: No auth methods could be used. dev32:~/git/dropbear# patch against latest git version attached.. Hans
DEBUGLEVEL.patch
Description: Binary data
