AnsweredAssumed Answered

Setting up dropbear ssh on busybox uclinux

Question asked by amcl Employee on Nov 19, 2012
Latest reply on Nov 20, 2012 by amcl

I am attempting to use dropbear for ssh access.

I followed the instructions on https://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:dropbear and I have successfully included dropbear in my distribution.

 

root:/> /usr/sbin/dropbear

Dropbear sshd v0.53.1

 

Along the way, I encountered a couple of issues building dropbear:

 

[#7168] 2012R1-RC2 fails to build speex

https://blackfin.uclinux.org/gf/project/toolchain/tracker/?action=TrackerItemEdit&tracker_item_id=7168

 

[#7506] Dropbear does not build

https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=7506

 

I can telnet to my board (BF609), rcp, and rsh, but I cannot ssh to the board.

 

When I try to connect from my desktop (Windows + Cygwin), I get the following:

 

$ ssh -vvv root@10.37.33.113

OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012

debug1: Reading configuration data /home/amclach/.ssh/config

debug1: Reading configuration data /etc/ssh_config

debug2: ssh_connect: needpriv 0

debug1: Connecting to 10.37.33.113 [10.37.33.113] port 22.

debug1: Connection established.

debug3: Incorrect RSA1 identifier

debug3: Could not load "/home/amclach/.ssh/id_rsa" as a RSA1 public key

debug1: identity file /home/amclach/.ssh/id_rsa type 1

debug1: identity file /home/amclach/.ssh/id_rsa-cert type -1

debug1: identity file /home/amclach/.ssh/id_dsa type -1

debug1: identity file /home/amclach/.ssh/id_dsa-cert type -1

debug1: identity file /home/amclach/.ssh/id_ecdsa type -1

debug1: identity file /home/amclach/.ssh/id_ecdsa-cert type -1

ssh_exchange_identification: Connection closed by remote host

 

I noticed that dropbear had been installed elsewhere in the image, so I tried adding a symlink and then I updated the /etc/inetd.conf file.

 

root:/> cat /etc/inetd.conf

shell   stream tcp nowait root /usr/libexec/rshd rshd

ftp     stream tcp nowait root /sbin/ftpd ftpd -w -S /srv/ftp/

telnet  stream tcp nowait root /sbin/telnetd telnetd -i

ssh     stream tcp nowait root /usr/sbin/dropbear -i 2 > /dev/null

 

root:/> ls -la /usr/sbin/dropbear

-rwxr-xr-x    1 root     root        182560 Nov 16  2012 /usr/sbin/dropbear

 

I am also unable to restart it due to an error being reported from the script:

 

root:/> /etc/init.d/S50dropbear

$Usage: /etc/init.d/S50dropbear {start|stop|restart}

root:/> /etc/init.d/S50dropbear stop

Stopping dropbear sshd: sh: can't execute 'start-stop-daemon': No such file or directory

OK

root:/> /etc/init.d/S50dropbear start

Starting dropbear sshd: sh: can't execute 'start-stop-daemon': No such file or directory

OK

root:/> find . -name "start-stop-daemon"

... returns nothing

 

How do I make ssh work in my Linux set-up?

 

I need ssh to use the Target Management (http://www.eclipse.org/tm/) support available in Eclipse.

 

I am using buildroot and Blackfin GNU tool chain 2012R1. I am also using blackfin-toolchain-uclibc-full, as opposed to blackfin-toolchain-uclibc-default.

Outcomes