LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 06-06-2014, 07:08 AM   #1
NaggingDaivy
LQ Newbie
 
Registered: Jun 2014
Posts: 2

Rep: Reputation: Disabled
Can't connect to Beaglebone Black with root using Dropbear


Hello everyone,

English is not my native language, so my apologies if I made mistakes.
I'm creating Linux from scratch for studies purposes, and I want to use as mush as tool that doesn't cost too much ressources. For example, I'm building my own rootfs with files only needed (such as make a static IP and have a default root user), and also by using Busybox and dropbear.
However, I just can't log using Dropbear, I'm getting this error when I'm using "ssh -v root@192.168.0.69" (that is the static IP address of my BBB) from my Macbook. I'm taping the same password I use for root, but I get errors :

dbug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/daivymerlijs/.ssh/id_rsa
debug1: Trying private key: /Users/daivymerlijs/.ssh/id_dsa
debug1: Next authentication method: password
root@192.168.0.69's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.


So, I'm denied to log. I just can't understand why, and it doesn't seem that Dropbear uses a particular file.
Even if i use "dropbear -s -g" to not use password, it doesn't work either. I already made my RSA key in "/etc/dropbear" too. I don't know what to do... Is anyone have an idea? Thanks in advance

Last edited by NaggingDaivy; 06-06-2014 at 07:17 AM.
 
Old 06-06-2014, 01:43 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I'd try a few iterations of tests to verify that things are working and connected properly. Boot the BBB off of it's eMMC if that still has the standard Angstrom boot on it; or have you reflashed the eMMC to boot your LFS? My thinking is that you're booting off of the uSD card to run LFS and the default Angstrom is still on the eMMC. So that's why i recommend you boot off of the default. You should be able to ssh to the BBB; yes the default boot performs DHCP; however you can connect to the network over USB and the address is 192.168.7.2. The relevant information about this is also in Beagle.org's getting started guide. This therefore verifies that there are no issues performing ssh from your macbook. Once attached you can alter the network configuration to be static if this is your preference and then ssh to both the 192.168.7.2 USBNet address as well as the Ethernet static IP; or likewise discern any DHCP address when you ssh over the USBNet and then you'll know what address to reach it to via eth0.

By the way, if all else fails; if you have a Linux bootable workstation; try and perform ssh from that to your BBB. For all things, I consider the Linux variation to be the most stable and sometimes whatever you have installed on your PC may be some free ware substitution of ssh and other Unix/Linux like utilities and they may not work, or may not work well.

From this you'll validate that your workstation can successfully ssh to the BBB, connections are valid, and so forth.

Next, botting LFS, if you can use the standard SSH, then try that; I'm not highly versed in whether dropbear is the standard, but on my systems I see /usr/bin/sshD for an SSH daemon; and that sounds pretty standard to me.

Note that the BBB has some reasonable space on the eMMC and if you boot off of a uSD, then that can be fairly large; I use 8G uSD cards myself, therefore between kernel and RFS I have about 6.5G of leftover free space; if not more; and that's without me minimizing my distribution in any manner. My thinking there is don't fret over using SSHD over dropbear as far as size goes; they may also be comparable in size too.

If you can get it working readily with standard sshD, then it becomes solely a dropbear question. Sorry, little experience there except to say that in the typical SSH scenario; if you follow the steps I've suggested, your workstation will have saved keys in it's known_hosts file for the addresses of your BBB and the next boot if you're using the same IP address or are assigned that same IP address via DHCP, this may cause the client to have difficulties because it remembers different keys for a different system, but same IP. As a result sometimes on the client you have to remove the .ssh/known_hosts file. Perhaps there is a similar dropbear equivalent. From what you wrote you generated that. SSH does that by asking if you wish to add trust for that peer via yes/no question and once you say yes, it adds that host information to the known_hosts file.

Last edited by rtmistler; 06-06-2014 at 01:45 PM.
 
Old 06-06-2014, 04:37 PM   #3
NaggingDaivy
LQ Newbie
 
Registered: Jun 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for your answer, but I definitively solve my problems.
In fect, I was making a static version of Dropbear, but it uses altough some shared libaries : I just had to put them in the "lib" folder and it was ok (zlib libraries and arm-linux-gnueabihf compiler libraries). After, I had the problem that my shell wasn't valid for Dropbear : I just had to make the "/etc/shells" file and put "bin/ash" and "bin/sh" (I'm using Busybox) in it. Another problem I had was when I log via SSH, I couldn't get a tty. This problem was solved following this link : http://www.denx.de/wiki/view/DULG/Te...rverNotWorking

I'm hope this will help people who will or who already had this problem before. :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BeagleBone Black - Firefox unable to connect (using usb cable) steve_pa Linux - Embedded & Single-board computer 3 02-15-2014 07:54 PM
beaglebone black running ubuntu. nixdunce Ubuntu 1 07-22-2013 09:20 PM
Beaglebone Black devwatchdog Linux - Embedded & Single-board computer 2 06-08-2013 10:50 PM
LXer: BeagleBone Black Review LXer Syndicated Linux News 0 05-29-2013 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration