ts-7000
[Top] [All Lists]

[ts-7000] RE: TS-7250 Dropbear SSH Fail

To: <>
Subject: [ts-7000] RE: TS-7250 Dropbear SSH Fail
From: <>
Date: 24 Jan 2014 14:53:41 -0800


> debug1: sending SSH2_MSG_KEXDH_INIT
> debug1: expecting SSH2_MSG_KEXDH_REPLY
> Connection closed by ...


OK, years later and I ran into the same problem after an ssh update on my host system!  Here's the cause of the problem (stolen from another group post by someone named Graham):

> Just to close off this thread, in case anyone finds it in the future. The
problem is definitely a dropbear bug. It is broken in dropbear 0.44 but works with dropbear 0.53.1. I found the OpenSSH code changes which trigger the bug and there are no option settings which can workround the dropbear problem.


Here's the versions in my setup:


    embedded board: Dropbear sshd v0.43

    host system: OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013


In other words, dropbear works as an SSH server if you're running an older version of the ssh client on the host but fails on updated versions of ssh.

The simplest solution would be to update dropbear on the board.  I spent some time on trying to cross-compile an updated version of dropbear but was unsuccessful.  If someone succeeds, perhaps they could share the binary with us!

My solution was to get and copy the Debian distribution sshd files onto the board and use that in place of dropbear.  I copied the following files:

    /usr/sbin/sshd
    /usr/bin/ssh-keygen
    /usr/lib/sftp-server
    /etc/ssh/sshd_config
    /etc/ssh/moduli
    /etc/hosts.allow
    /etc/hosts.deny


I then created a simple start-up script /etc/init.d/ssh as follows:

    #!/bin/sh
    #
    # /etc/init.d/ssh

    case "$1" in
        start)
            echo -n "Starting sshd..."
            /usr/sbin/sshd
            ;;
        stop)
            echo -n "Stopping sshd..."
            killall sshd
            ;;
        *)
            echo "Usage: start|stop"
            ;;
    esac

And linked it as follows:

    $ cd /etc/rc.d/rc3.d
    $ ln -s ../../init.d/ssh S25ssh

I also needed to copy the following libraries and place them in /lib:

    libcrypto.so.0.9.7
    libpam.so.0.76
    libpthread-0.10.so
    libpthread.so
    libz.so.1.2.2

And set up the links as follows:

    $ cd /lib
    $ ln -s libcrypto.so.0.9.7 libcrypto.so
    $ ln -s libpam.so.0.76 libpam.so.0
    $ ln -s libpthread-0.10.so libpthread.so.0
    $ ln -s libz.so.1.2.2 libz.so.1

Then generate the host system key as follows:

    $ ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key

And also remove dropbear from /etc/inetd.conf by commenting out the ssh line with an editor so that it looks like this:

    #ssh stream tcp nowait root /usr/sbin/dropbear dropbear -i

Reboot and hopefully it will now work for you!

__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] RE: TS-7250 Dropbear SSH Fail, ronmuzzi <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU