<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Peter,<div class=""><br class=""></div><div class="">This should be fixed in <a href="https://secure.ucc.asn.au/hg/dropbear/rev/0dc3103a5900" class="">https://secure.ucc.asn.au/hg/dropbear/rev/0dc3103a5900</a></div><div class=""><br class=""></div><div class="">Dropbear was advertising both the existing ecdsa size as well as the default size (for -R), </div><div class="">but then the client chose the default size which didn't match the key that had been loaded.</div><div class="">Now it only advertises a single size - first preference existing size, otherwise the default if no </div><div class="">key exists.</div><div class="">Thanks for letting me know and debugging.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Matt</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mon 5/3/2018, at 4:02 pm, Peter Krefting <<a href="mailto:peter@softwolves.pp.se" class="">peter@softwolves.pp.se</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Matt Johnston:<br class=""><br class=""><blockquote type="cite" class="">Yes it should. I can't immediately reproduce it here, what<br class="">flags are you giving to Dropbear? Is<br class="">/mnt/nv/dropbear_ecdsa_host_key specified with -r or as a<br class="">default config path, and are there other keyfiles?<br class=""></blockquote><br class="">The daemon is started with "dropbear -R", and the keyfiles are specified at compile-time, using localoptions.h. The full file is included below.<br class=""><br class=""><blockquote type="cite" class="">ssh -vvv will print the full set of negotiated algorithms,<br class="">you could send that to me (off-list if you want).<br class=""></blockquote><br class="">I have included the output below<br class=""><br class=""><blockquote type="cite" class="">The relevant revision for that changelog note is<br class=""><a href="https://secure.ucc.asn.au/hg/dropbear/rev/016b86f03e21" class="">https://secure.ucc.asn.au/hg/dropbear/rev/016b86f03e21</a><br class="">you could try reverting that to confirm.<br class=""></blockquote><br class="">That does not seem to fix the issue, it aborts in the same location, so it seems something else is going on here.<br class=""><br class=""><br class="">===[ localoptions.h ]===<br class="">/* Put host keys in non-volatile storage */<br class="">#define DSS_PRIV_FILENAME "/mnt/nv/dropbear_dss_host_key"<br class="">#define RSA_PRIV_FILENAME "/mnt/nv/dropbear_rsa_host_key"<br class="">#define ECDSA_PRIV_FILENAME "/mnt/nv/dropbear_ecdsa_host_key"<br class=""><br class="">/* Disable inetd mode */<br class="">#define INETD_MODE 0<br class=""><br class="">/* Disable X11 forwarding as we do not have any X11. */<br class="">#define DROPBEAR_X11FWD 0<br class=""><br class="">/* Disable port forwarding and proxying and agent forwarding. */<br class="">#define DROPBEAR_CLI_LOCALTCPFWD 0<br class="">#define DROPBEAR_CLI_REMOTETCPFWD 0<br class="">#define DROPBEAR_SVR_LOCALTCPFWD 0<br class="">#define DROPBEAR_SVR_REMOTETCPFWD 0<br class="">#define DROPBEAR_SVR_AGENTFWD 0<br class="">#define DROPBEAR_CLI_AGENTFWD 0<br class="">#define DROPBEAR_CLI_PROXYCMD 0<br class="">#define DROPBEAR_CLI_NETCAT 0<br class=""><br class="">/* Disable Twofish to save about 10 kilobytes. */<br class="">#define DROPBEAR_TWOFISH256 0<br class="">#define DROPBEAR_TWOFISH128 0<br class=""><br class="">/* Disable /etc/motd support since nothing else on the target uses it. */<br class="">#define DO_MOTD 0<br class=""><br class="">/* Put client keys in non-volatile storage */<br class="">#define DROPBEAR_DEFAULT_CLI_AUTHKEY "/mnt/nv/id_dropbear"<br class=""><br class="">/* Disable sftp support (as we do not have a binary for sftp installed). */<br class="">#define DROPBEAR_SFTPSERVER 0<br class=""><br class="">/* Patch it to use the same default PATH as the telnet daemon. This will<br class=""> * fix scripts that assume certain tools are in the path. */<br class=""> #define DEFAULT_PATH "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"<br class="">===[ end localoptions.h ]===<br class=""><br class="">===[ output from ssh -vvvv ]===<br class="">$ ssh -vvvv <a href="mailto:root@10.0.30.175" class="">root@10.0.30.175</a><br class="">OpenSSH_7.4p1 Debian-10+deb9u2, OpenSSL 1.0.2l 25 May 2017<br class="">debug1: Reading configuration data /home/peter/.ssh/config<br class="">debug1: /home/peter/.ssh/config line 54: Applying options for 10.0.30.175<br class="">debug1: Reading configuration data /etc/ssh/ssh_config<br class="">debug1: /etc/ssh/ssh_config line 19: Applying options for *<br class="">debug2: resolving "10.0.30.175" port 22<br class="">debug2: ssh_connect_direct: needpriv 0<br class="">debug1: Connecting to 10.0.30.175 [10.0.30.175] port 22.<br class="">debug1: Connection established.<br class="">debug1: identity file /home/peter/.ssh/id_rsa type 1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_rsa-cert type -1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_dsa type -1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_dsa-cert type -1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_ecdsa type -1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_ecdsa-cert type -1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_ed25519 type -1<br class="">debug1: key_load_public: No such file or directory<br class="">debug1: identity file /home/peter/.ssh/id_ed25519-cert type -1<br class="">debug1: Enabling compatibility mode for protocol 2.0<br class="">debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u2<br class="">debug1: Remote protocol version 2.0, remote software version dropbear_2018.76<br class="">debug1: no match: dropbear_2018.76<br class="">debug2: fd 3 setting O_NONBLOCK<br class="">debug1: Authenticating to 10.0.30.175:22 as 'root'<br class="">debug3: hostkeys_foreach: reading file "/home/peter/.ssh/known_hosts"<br class="">debug3: record_hostkey: found key type ECDSA in file /home/peter/.ssh/known_hosts:126<br class="">debug3: load_hostkeys: loaded 1 keys from 10.0.30.175<br class="">debug3: order_hostkeyalgs: prefer hostkeyalgs: <a href="mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com" class="">ecdsa-sha2-nistp256-cert-v01@openssh.com</a>,<a href="mailto:ecdsa-sha2-nistp384-cert-v01@openssh.com" class="">ecdsa-sha2-nistp384-cert-v01@openssh.com</a>,<a href="mailto:ecdsa-sha2-nistp521-cert-v01@openssh.com" class="">ecdsa-sha2-nistp521-cert-v01@openssh.com</a>,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521<br class="">debug3: send packet: type 20<br class="">debug1: SSH2_MSG_KEXINIT sent<br class="">debug3: receive packet: type 20<br class="">debug1: SSH2_MSG_KEXINIT received<br class="">debug2: local client KEXINIT proposal<br class="">debug2: KEX algorithms: curve25519-sha256,<a href="mailto:curve25519-sha256@libssh.org" class="">curve25519-sha256@libssh.org</a>,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c<br class="">debug2: host key algorithms: <a href="mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com" class="">ecdsa-sha2-nistp256-cert-v01@openssh.com</a>,<a href="mailto:ecdsa-sha2-nistp384-cert-v01@openssh.com" class="">ecdsa-sha2-nistp384-cert-v01@openssh.com</a>,<a href="mailto:ecdsa-sha2-nistp521-cert-v01@openssh.com" class="">ecdsa-sha2-nistp521-cert-v01@openssh.com</a>,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,<a href="mailto:ssh-ed25519-cert-v01@openssh.com" class="">ssh-ed25519-cert-v01@openssh.com</a>,<a href="mailto:ssh-rsa-cert-v01@openssh.com" class="">ssh-rsa-cert-v01@openssh.com</a>,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa<br class="">debug2: ciphers ctos: <a href="mailto:chacha20-poly1305@openssh.com" class="">chacha20-poly1305@openssh.com</a>,aes128-ctr,aes192-ctr,aes256-ctr,<a href="mailto:aes128-gcm@openssh.com" class="">aes128-gcm@openssh.com</a>,<a href="mailto:aes256-gcm@openssh.com" class="">aes256-gcm@openssh.com</a>,aes128-cbc,aes192-cbc,aes256-cbc<br class="">debug2: ciphers stoc: <a href="mailto:chacha20-poly1305@openssh.com" class="">chacha20-poly1305@openssh.com</a>,aes128-ctr,aes192-ctr,aes256-ctr,<a href="mailto:aes128-gcm@openssh.com" class="">aes128-gcm@openssh.com</a>,<a href="mailto:aes256-gcm@openssh.com" class="">aes256-gcm@openssh.com</a>,aes128-cbc,aes192-cbc,aes256-cbc<br class="">debug2: MACs ctos: <a href="mailto:umac-64-etm@openssh.com" class="">umac-64-etm@openssh.com</a>,<a href="mailto:umac-128-etm@openssh.com" class="">umac-128-etm@openssh.com</a>,<a href="mailto:hmac-sha2-256-etm@openssh.com" class="">hmac-sha2-256-etm@openssh.com</a>,<a href="mailto:hmac-sha2-512-etm@openssh.com" class="">hmac-sha2-512-etm@openssh.com</a>,<a href="mailto:hmac-sha1-etm@openssh.com" class="">hmac-sha1-etm@openssh.com</a>,<a href="mailto:umac-64@openssh.com" class="">umac-64@openssh.com</a>,<a href="mailto:umac-128@openssh.com" class="">umac-128@openssh.com</a>,hmac-sha2-256,hmac-sha2-512,hmac-sha1<br class="">debug2: MACs stoc: <a href="mailto:umac-64-etm@openssh.com" class="">umac-64-etm@openssh.com</a>,<a href="mailto:umac-128-etm@openssh.com" class="">umac-128-etm@openssh.com</a>,<a href="mailto:hmac-sha2-256-etm@openssh.com" class="">hmac-sha2-256-etm@openssh.com</a>,<a href="mailto:hmac-sha2-512-etm@openssh.com" class="">hmac-sha2-512-etm@openssh.com</a>,<a href="mailto:hmac-sha1-etm@openssh.com" class="">hmac-sha1-etm@openssh.com</a>,<a href="mailto:umac-64@openssh.com" class="">umac-64@openssh.com</a>,<a href="mailto:umac-128@openssh.com" class="">umac-128@openssh.com</a>,hmac-sha2-256,hmac-sha2-512,hmac-sha1<br class="">debug2: compression ctos: none,<a href="mailto:zlib@openssh.com" class="">zlib@openssh.com</a>,zlib<br class="">debug2: compression stoc: none,<a href="mailto:zlib@openssh.com" class="">zlib@openssh.com</a>,zlib<br class="">debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal<br class="">debug2: KEX algorithms: curve25519-sha256,<a href="mailto:curve25519-sha256@libssh.org" class="">curve25519-sha256@libssh.org</a>,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,<a href="mailto:kexguess2@matt.ucc.asn.au" class="">kexguess2@matt.ucc.asn.au</a><br class="">debug2: host key algorithms: ecdsa-sha2-nistp256,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss<br class="">debug2: ciphers ctos: aes128-ctr,aes256-ctr,aes128-cbc,aes256-cbc,3des-ctr,3des-cbc<br class="">debug2: ciphers stoc: aes128-ctr,aes256-ctr,aes128-cbc,aes256-cbc,3des-ctr,3des-cbc<br class="">debug2: MACs ctos: hmac-sha1-96,hmac-sha1,hmac-sha2-256<br class="">debug2: MACs stoc: hmac-sha1-96,hmac-sha1,hmac-sha2-256<br class="">debug2: compression ctos: <a href="mailto:zlib@openssh.com" class="">zlib@openssh.com</a>,none<br class="">debug2: compression stoc: <a href="mailto:zlib@openssh.com" class="">zlib@openssh.com</a>,none<br class="">debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256<br class="">debug1: kex: host key algorithm: ecdsa-sha2-nistp256<br class="">debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none<br class="">debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none<br class="">debug3: send packet: type 30<br class="">debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br class="">Connection closed by 10.0.30.175 port 22<br class="">===[ end output from ssh -vvvv ]===<br class=""><br class="">-- <br class="">\\// Peter - <a href="http://www.softwolves.pp.se/" class="">http://www.softwolves.pp.se/</a><br class=""></div></div></blockquote></div><br class=""></div></body></html>