PATCH: minimum set of trace messages in dbclient

Hans Harder hans at atbas.org
Sun Aug 7 04:42:10 AWST 2016


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 curve25519-sha256 at libssh.org
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 zlib at openssh.com
TRACE  (13755) 0.011585: comp s2c is zlib at openssh.com
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 root at 192.168.1.150:22 exited: No auth methods could
be used.
dev32:~/git/dropbear#

patch against latest git version attached..

Hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20160806/48bb692f/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DEBUGLEVEL.patch
Type: application/octet-stream
Size: 9416 bytes
Desc: not available
Url : http://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20160806/48bb692f/attachment-0001.obj 


More information about the Dropbear mailing list