Unable to SSH to Beagle Bone Black

27989 views
Skip to first unread message

Chris Micali

unread,
May 1, 2013, 5:39:49 PM5/1/13
to beagl...@googlegroups.com
Hi,

    I got two BBBs in the mail - I plugged one in and everything has been working fine.  SSHed to it, moved my s/w to it, etc.  I then powered it off and plugged the other one in and can't SSH to it.  I get a ssh_exchange_identification: Connection closed by remote host error.  I get this error no matter what machine I am trying to connect from.  Someone on IRC had this same problem and didn't think much of it then, but this is a board that is right out of the box and exhibiting this issue.  The LEDs appear that it has booted fine.



cmicali@imac
~> ssh -vvv root@beaglebone.local
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1
: Reading configuration data /etc/ssh_config
debug1
: /etc/ssh_config line 20: Applying options for *
debug1
: /etc/ssh_config line 53: Applying options for *
debug2
: ssh_connect: needpriv 0
debug1
: Connecting to beaglebone.local [192.168.1.32] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3
: Could not load "/Users/cmicali/.ssh/id_rsa" as a RSA1 public key
debug1
: identity file /Users/cmicali/.ssh/id_rsa type 1
debug1
: identity file /Users/cmicali/.ssh/id_rsa-cert type -1
debug1
: identity file /Users/cmicali/.ssh/id_dsa type -1
debug1
: identity file /Users/cmicali/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host




    Any ideas what could be going on?

-chris

Jason Stapels

unread,
May 1, 2013, 8:13:08 PM5/1/13
to beagl...@googlegroups.com, jim...@mixographer.com
Just to elaborate on what Jimmy said. In case your known_hosts file is hashed and you're having a hard time finding the right entries, you can either delete the entire file (not recommend), or you can use the keygen tool:

host> ssh-keygen -R beaglebone.local
host
> ssh-keygen -R 192.168.1.32


On Wednesday, May 1, 2013 6:07:47 PM UTC-4, jim...@mixographer.com wrote:
I don't have a BBB yet, but I imagine that your ~/.ssh/known_hosts  file has an entry in it for beaglebone.local. remove that line and then you should be able to ssh to the second BBB. Now when you go back to the original BBB it won't match the entry in .ssh/known_hosts (it now matches the second board). Delete the line again for beaglebone.local and you can ssh to the first one.

Jimmy

evilwulfie

unread,
May 1, 2013, 11:35:43 PM5/1/13
to beagl...@googlegroups.com
After not being able to run the BBB web page scripts in my firefox i am accessing it through chrome
now i see chris having this ssh issue from a mac and i am having the same error from my windows box using either
putty or the built in one on the BBB  error is as follows

[Press Shift-F1 for help]
                                                                                                                                             
Host/IP or SSH URL [localhost]:
Port [22]:
User: root
Connecting to ssh://root@localhost:22
                                                                                                                                             
                                                                                                                                             
ssh_exchange_identification: Connection closed by remote host
[Press Enter to close this terminal]

[Press Shift-F1 for help]
                                                                                                                                             
Host/IP or SSH URL [localhost]:
Port [22]:
User: root
Connecting to ssh://root@localhost:22
                                                                                                                                             
                                                                                                                                             
ssh_exchange_identification: Connection closed by remote host
[Press Enter to close this terminal]
 
[Press Shift-F1 for help]
                                                                                                                                            
Host/IP or SSH URL [localhost]:
Port [22]:
User: root
Connecting to ssh://root@localhost:22

                                                                                                                                            
                                                                                                                                            
ssh_exchange_identification: Connection closed by remote host
[Press Enter to close this terminal]

now i ran the set date button before doing this
wondering whats going on here
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

cmicali

unread,
May 2, 2013, 11:05:45 AM5/2/13
to beagl...@googlegroups.com, jim...@mixographer.com
Thanks guys - unfortunately I had tried that and it did not solve the problem..  

cmicali@cmicali-imac ~ [255]> ssh-keygen -R beaglebone.local
/Users/cmicali/.ssh/known_hosts updated.
Original contents retained as /Users/cmicali/.ssh/known_hosts.old
cmicali@cmicali
-imac ~> ssh-keygen -R 192.168.1.32
/Users/cmicali/.ssh/known_hosts updated.
Original contents retained as /Users/cmicali/.ssh/known_hosts.old
cmicali@cmicali
-imac ~> ssh -vvv root@192.168.1.32

OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1
: Reading configuration data /etc/ssh_config
debug1
: /etc/ssh_config line 20: Applying options for *
debug1
: /etc/ssh_config line 53: Applying options for *
debug2
: ssh_connect: needpriv 0

debug1
: Connecting to 192.168.1.32 [192.168.1.32] port 22.

debug1
: Connection established.
debug3
: Incorrect RSA1 identifier
debug3
: Could not load "/Users/cmicali/.ssh/id_rsa" as a RSA1 public key
debug1
: identity file /Users/cmicali/.ssh/id_rsa type 1
debug1
: identity file /Users/cmicali/.ssh/id_rsa-cert type -1
debug1
: identity file /Users/cmicali/.ssh/id_dsa type -1
debug1
: identity file /Users/cmicali/.ssh/id_dsa-cert type -1
ssh_exchange_identification
: Connection closed by
remote host
cmicali@cmicali
-imac ~ [255]>

I even tried starting fresh by moving .ssh to .ssh-old and connecting, same behavior.

Jason Stapels

unread,
May 2, 2013, 12:26:39 PM5/2/13
to beagl...@googlegroups.com, jim...@mixographer.com
I would try accessing the BB via the serial console and see if there's any SSH logs.

cmicali

unread,
May 2, 2013, 1:26:25 PM5/2/13
to beagl...@googlegroups.com, jim...@mixographer.com
Yeah, I ordered the FTDI cable yesterday, arriving tomorrow..  I'll respond with what I find.

cmicali

unread,
May 3, 2013, 11:01:05 AM5/3/13
to beagl...@googlegroups.com, jim...@mixographer.com
Just to follow up - I did not have the patience to wait for the FTDI cable to arrive so I re-flashed the eMMC using the provided latest image and that solved the problem.  

evilwulfie

unread,
May 3, 2013, 12:36:08 PM5/3/13
to beagl...@googlegroups.com
how did you go about doing that ?
were the instructions on the BBB webpage the ones you followed ?

Gerald Coley

unread,
May 3, 2013, 12:50:56 PM5/3/13
to beagl...@googlegroups.com

evilwulfie

unread,
May 3, 2013, 7:52:16 PM5/3/13
to beagl...@googlegroups.com
after a flash to the newest version ssh works fine

so it seems to be something in the stock image that causes some boards to fail SSH

yay!

Gerald Coley

unread,
May 3, 2013, 7:55:16 PM5/3/13
to beagl...@googlegroups.com
Correct. So, we will be moving to this as the production image (stock image) and as soon as Jason updates the webpage, everyone will have a place to find it.

Gerald

Jacek Radzikowski

unread,
May 3, 2013, 8:36:11 PM5/3/13
to beagl...@googlegroups.com
Did you rename the .ssh directory on your imac or on the Beaglebone?
The messages suggests that the files with RSA and DSA keys on your
workstation may be corrupted.

j.


On Thu, May 2, 2013 at 11:05 AM, cmicali <chris....@sagedevices.com> wrote:
> Thanks guys - unfortunately I had tried that and it did not solve the
> problem..
>
> cmicali@cmicali-imac ~ [255]> ssh-keygen -R beaglebone.local
> /Users/cmicali/.ssh/known_hosts updated.
> Original contents retained as /Users/cmicali/.ssh/known_hosts.old
> cmicali@cmicali-imac ~> ssh-keygen -R 192.168.1.32
> /Users/cmicali/.ssh/known_hosts updated.
> Original contents retained as /Users/cmicali/.ssh/known_hosts.old
> cmicali@cmicali-imac ~> ssh -vvv ro...@192.168.1.32
>>>> cmicali@imac ~> ssh -vvv ro...@beaglebone.local
>>>> OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
>>>> debug1: Reading configuration data /etc/ssh_config
>>>> debug1: /etc/ssh_config line 20: Applying options for *
>>>> debug1: /etc/ssh_config line 53: Applying options for *
>>>> debug2: ssh_connect: needpriv 0
>>>> debug1: Connecting to beaglebone.local [192.168.1.32] port 22.
>>>> debug1: Connection established.
>>>> debug3: Incorrect RSA1 identifier
>>>> debug3: Could not load "/Users/cmicali/.ssh/id_rsa" as a RSA1 public key
>>>> debug1: identity file /Users/cmicali/.ssh/id_rsa type 1
>>>> debug1: identity file /Users/cmicali/.ssh/id_rsa-cert type -1
>>>> debug1: identity file /Users/cmicali/.ssh/id_dsa type -1
>>>> debug1: identity file /Users/cmicali/.ssh/id_dsa-cert type -1
>>>> ssh_exchange_identification: Connection closed by remote host
>>>>
>>>>
>>>>
>>>>
>>>> Any ideas what could be going on?
>>>>
>>>> -chris
>>>>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Given a choice between two theories, take the one which is funnier

Glen H

unread,
May 3, 2013, 11:27:26 PM5/3/13
to beagl...@googlegroups.com
Hi,

(Skip down to (5) to see the solution to ssh_exchange_identification: Connection closed by remote host.)

I updated to the 2013-05-02 image and I can't log in via ssh anymore. 

At first I got the error:

penSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to beaglebone [192.168.1.50] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

I don't have any identity files on the client.  

1) I tried ssh'ing into another machine and it works fine.

2) I then updated ssh with 'opkg update && opkg upgrade' to a slightly newer version (I forget the detailed version number, the last digit was incremented...it reports Dropbear sshd v2012.55 on the command line).

3) I tried moving away my .ssh/know_hosts file on the client but I got the same error.

4) I noticed when I '/etc/init.d/dropbear restart' that it seemed like it never started because it couldn't be found when stopping.

5) From looking at the script above (/etc/init.d/dropbear) it seems like the identity file in /etc/dropbear/dropbear_rsa_host_key might be causing the problem and the script recreates them if they don't exist.  So I removed it and started dropbear (/etc/init.d/dropbear start) again and it generated new keys and then I could ssh in.  It now works!  (The side effect of doing this is you also have to remove a line in the client's ~/.shh/know_hosts because the identity of the beaglebone has changed.)

Glen

tom.rut...@gmail.com

unread,
Jun 28, 2013, 2:05:17 PM6/28/13
to beagl...@googlegroups.com
Thanks!  Was having the same problem, this script fixed it right up.

On Saturday, May 11, 2013 3:25:12 PM UTC-4, Martin Schweizer wrote:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});

kim....@atkexpress.fi

unread,
Jul 30, 2013, 8:01:35 AM7/30/13
to beagl...@googlegroups.com
i just get "true" as response in console when starting and stopping that script in C9.

I guess I have to change the os to get access to the board. Node.js would have been nice to try but no can do...

aghat...@innobec.com

unread,
Aug 25, 2013, 10:56:16 PM8/25/13
to beagl...@googlegroups.com, kim....@atkexpress.fi
You should uncheck the "run in debug mode" to simple run mode in C9. Then the script will work as expected.

ab...@quixotiq.mobi

unread,
Aug 25, 2013, 11:00:58 PM8/25/13
to beagl...@googlegroups.com, kim....@atkexpress.fi
+1 for +Martin Schweizer, great solution with the script.

Remember to uncheck the "run in debug mode" in C9 to run the script.


On Tuesday, July 30, 2013 8:01:35 AM UTC-4, kim....@atkexpress.fi wrote:

spen...@gmail.com

unread,
Aug 30, 2013, 9:37:07 PM8/30/13
to beagl...@googlegroups.com
i too am unable to ssh to my beagle bone black i received tonight. i am using os x and am able to get to the bbb homepage.   i tried Martin S.'s script (not in debug) and "it seems that you have another problem, sorry". any more ideas i can try?

Thanks,
Brian

Abhay Ghatpande

unread,
Aug 30, 2013, 10:07:54 PM8/30/13
to beagl...@googlegroups.com
Can you post your console log when you use ssh -vvv?

--
Abhay Ghatpande
+1-514-442-7661
ab...@quixotiq.mobi

QuixotiQ Technologies
http://www.quixotiq.mobi


On Fri, Aug 30, 2013 at 9:37 PM, <spen...@gmail.com> wrote:
> i too am unable to ssh to my beagle bone black i received tonight. i am
> using os x and am able to get to the bbb homepage. i tried Martin S.'s
> script (not in debug) and "it seems that you have another problem, sorry".
> any more ideas i can try?
>
> Thanks,
> Brian
>
>
>
> On Wednesday, May 1, 2013 5:39:49 PM UTC-4, cmicali wrote:
>>
>> Hi,
>>
>> I got two BBBs in the mail - I plugged one in and everything has been
>> working fine. SSHed to it, moved my s/w to it, etc. I then powered it off
>> and plugged the other one in and can't SSH to it. I get a
>> ssh_exchange_identification: Connection closed by remote host error. I get
>> this error no matter what machine I am trying to connect from. Someone on
>> IRC had this same problem and didn't think much of it then, but this is a
>> board that is right out of the box and exhibiting this issue. The LEDs
>> appear that it has booted fine.
>>
>>
>>
>> cmicali@imac ~> ssh -vvv ro...@beaglebone.local
>> OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
>> debug1: Reading configuration data /etc/ssh_config
>> debug1: /etc/ssh_config line 20: Applying options for *
>> debug1: /etc/ssh_config line 53: Applying options for *
>> debug2: ssh_connect: needpriv 0
>> debug1: Connecting to beaglebone.local [192.168.1.32] port 22.
>> debug1: Connection established.
>> debug3: Incorrect RSA1 identifier
>> debug3: Could not load "/Users/cmicali/.ssh/id_rsa" as a RSA1 public key
>> debug1: identity file /Users/cmicali/.ssh/id_rsa type 1
>> debug1: identity file /Users/cmicali/.ssh/id_rsa-cert type -1
>> debug1: identity file /Users/cmicali/.ssh/id_dsa type -1
>> debug1: identity file /Users/cmicali/.ssh/id_dsa-cert type -1
>> ssh_exchange_identification: Connection closed by remote host
>>
>>
>>
>>
>> Any ideas what could be going on?
>>
>> -chris
>>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/Ya2qE4repSY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

henry.va...@gmail.com

unread,
Sep 9, 2013, 3:31:46 PM9/9/13
to beagl...@googlegroups.com
Thanks , works ok
Henry

Op zaterdag 11 mei 2013 21:25:12 UTC+2 schreef Martin Schweizer:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});



Am Samstag, 4. Mai 2013 05:27:26 UTC+2 schrieb Glen H:

mla...@gmail.com

unread,
Oct 17, 2013, 2:20:47 PM10/17/13
to beagl...@googlegroups.com
That worked fine. Thank you!

chaudhari....@gmail.com

unread,
Oct 20, 2013, 1:35:05 AM10/20/13
to beagl...@googlegroups.com
Works great. This shld be on stackoverflow. Very difficult to follow on google groups.


On Saturday, 11 May 2013 15:25:12 UTC-4, Martin Schweizer wrote:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});



Am Samstag, 4. Mai 2013 05:27:26 UTC+2 schrieb Glen H:

gre...@gmail.com

unread,
Nov 6, 2013, 6:49:20 AM11/6/13
to beagl...@googlegroups.com
Thanks! This script worked for me!


Il giorno sabato 11 maggio 2013 21:25:12 UTC+2, Martin Schweizer ha scritto:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});



Am Samstag, 4. Mai 2013 05:27:26 UTC+2 schrieb Glen H:

bria...@gmail.com

unread,
Nov 29, 2013, 7:15:40 AM11/29/13
to beagl...@googlegroups.com
Thankyou ,that really solve my problem .   woooo

在 2013年5月2日星期四UTC+8上午5时39分49秒,cmicali写道:

iljya...@gmail.com

unread,
Dec 24, 2013, 5:58:06 PM12/24/13
to beagl...@googlegroups.com
This worked perfectly from cloud9. Thanks! It has to be done from cloud9 though as far as I can tell since not all the example text boxes have 'fs' available (not sure why).


On Saturday, May 11, 2013 3:25:12 PM UTC-4, Martin Schweizer wrote:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});



Am Samstag, 4. Mai 2013 05:27:26 UTC+2 schrieb Glen H:

andy.w....@gmail.com

unread,
Feb 2, 2014, 9:33:54 PM2/2/14
to beagl...@googlegroups.com, jim...@mixographer.com
I was having this same problem and this solved it perfectly.  Thank you Jimmy!



-Andy


On Wednesday, May 1, 2013 5:07:47 PM UTC-5, jim...@mixographer.com wrote:
I don't have a BBB yet, but I imagine that your ~/.ssh/known_hosts  file has an entry in it for beaglebone.local. remove that line and then you should be able to ssh to the second BBB. Now when you go back to the original BBB it won't match the entry in .ssh/known_hosts (it now matches the second board). Delete the line again for beaglebone.local and you can ssh to the first one.

Jimmy

On Wednesday, May 1, 2013 2:39:49 PM UTC-7, cmicali wrote:

afe...@gmail.com

unread,
Feb 20, 2014, 7:33:36 PM2/20/14
to beagl...@googlegroups.com
Me and my colleague spent a day or two trying to fix issues like this that kept creeping up on our beaglebone black boards. We would be unable to SSH to them or it would hang at:
debug1: identity file /Users/cmicali/.ssh/id_dsa-cert type -1
It wouldn't always say connection closed. I tried every single idea I saw posted in this thread and others.

In the end it seemed Avahi daemon was causing issues. I found this through the following:
1.) I ran "top" which showed me that systemd and systemd-journal were running at 100% of the CPU combined.
2.) I used "journalctl -b" to see what journal output was being created for this boot. This showed error after error for Avahi at full CPU speed.
3.) I stopped avahi-daemon, which I haven't yet seen the ramifications of using:
 systemctl disable avahi-daemon.service
4.) I ran "df -h" which showed me that my storage was completely used up!
5.) I located the log in /var/log/journal/<some weird string of numbers and letters>
6.) I deleted all the files in the aforementioned directory
7.) I did as this thread suggests for the 20th time and deleted the dropbear_rsa_host_key file
8.) I stopped dropbear using: "/etc/init.d/dropbear stop"
9.) I started dropbear using "/etc/init.d/dropbear start"
10.) It proceeded to generate a new key.
11.) At this point I tried connecting again from a client which was successful.

Perhaps I could have stopped at step 6 and just stopped and restarted dropbear but that's what I did to make it work! Hope this saves someone else a day -.-

Hor Meng Yoong

unread,
Feb 20, 2014, 9:36:42 PM2/20/14
to beagl...@googlegroups.com
Was there a conflict in hostname, i.e., two BBB with the same name?
For me, I would rather to have fixed IP addresses:
a) More CPU efficient without avahi and bonjour running around
b) Avoid name lookup


dbr...@ideo.com

unread,
Mar 10, 2014, 4:16:33 AM3/10/14
to beagl...@googlegroups.com


On Wednesday, May 1, 2013 2:39:49 PM UTC-7, cmicali wrote:
Hi,

    I got two BBBs in the mail - I plugged one in and everything has been working fine.  SSHed to it, moved my s/w to it, etc.  I then powered it off and plugged the other one in and can't SSH to it.  I get a ssh_exchange_identification: Connection closed by remote host error.  I get this error no matter what machine I am trying to connect from.  Someone on IRC had this same problem and didn't think much of it then, but this is a board that is right out of the box and exhibiting this issue.  The LEDs appear that it has booted fine.



cmicali@imac
~> ssh -vvv root@beaglebone.local
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1
: Reading configuration data /etc/ssh_config
debug1
: /etc/ssh_config line 20: Applying options for *
debug1
: /etc/ssh_config line 53: Applying options for *
debug2
: ssh_connect: needpriv 0
debug1
: Connecting to beaglebone.local [192.168.1.32] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3
: Could not load "/Users/cmicali/.ssh/id_rsa" as a RSA1 public key
debug1
: identity file /Users/cmicali/.ssh/id_rsa type 1
debug1
: identity file /Users/cmicali/.ssh/id_rsa-cert type -1

debug1
:<spa
...

dbr...@ideo.com

unread,
Mar 10, 2014, 4:29:51 AM3/10/14
to beagl...@googlegroups.com
I also had a lot of trouble with this and I found Aaron Felts post down below very useful. I found that my BBB was at 100% disk usage and I couldn't SSH in.  I was able to use the Cloud9 IDE to get in at port 3000 and use this javascript file to delete the log files and restart dropbear.  After that I was able to SSH in and I then changed the journaling settings to make sure this didn't happen again.

--Warning, this will delete your journal logs--


var exec = require('child_process').exec;
function puts(error, stdout, stderr) { console.log(error); console.log(stdout); console.log(stderr); }

// 1 - Clear journal space
exec("df -h; rm -rf /var/log/journal/; df -h", puts);

// 2 - Remove Dropbear file
exec("rm /etc/dropbear/dropbear_rsa_host_key", puts);

// 3 - Stop Dropbear
exec("/etc/init.d/dropbear stop", puts);

// 4 - Start Dropbear
exec("/etc/init.d/dropbear start", puts);


Then check out this post to set journaling settings to limit disk space usage:

Hope that helps!

On Saturday, May 11, 2013 12:25:12 PM UTC-7, Martin Schweizer wrote:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});



Am Samstag, 4. Mai 2013 05:27:26 UTC+2 schrieb Glen H:
...

jhenri...@gmail.com

unread,
Apr 15, 2014, 10:41:14 PM4/15/14
to beagl...@googlegroups.com, dbr...@ideo.com
Thanks a lot, guys! You saved my life!!!
José Henrique

pvan...@patricknet.nl

unread,
Apr 25, 2014, 9:48:01 AM4/25/14
to beagl...@googlegroups.com
This worked for me!
 
Thanks!

Op zaterdag 11 mei 2013 21:25:12 UTC+2 schreef Martin Schweizer:
inspired by this post a have a simple solution for those who have the problem and can't connect via serial console

open the cloud9 and create a new file with the following script and start it, or place the script in any textbox where you can interact with your beaglebone and press run


var fs = require('fs');
var destroyed_key_file = '/etc/dropbear/dropbear_rsa_host_key';

fs.readFile(destroyed_key_file, function (err, data) {

  if (err) throw err;
  
  if( data===null || data.length===0 )
  {
    console.log("we have a corrupted host key file... try do delete it");
    fs.unlink(destroyed_key_file, function (err) {
    if (err) throw err;
        console.log('successfully deleted ' + destroyed_key_file);
        console.log('you should now reboot your beaglebone.');
        console.log('the /etc/init.d/dropbear script will create a new rsa host key file for you.');
        console.log('after the reboot you should be able to login over ssh');
    });
  } else {
      console.log("it seems that you have another problem, sorry");
  }
});



Am Samstag, 4. Mai 2013 05:27:26 UTC+2 schrieb Glen H:

da...@prec-design.com

unread,
Aug 9, 2014, 12:06:42 PM8/9/14
to beagl...@googlegroups.com
I can't seem to connect to my BBB by any means. (From Windows 8)

Tried USB, and got the directory structure, and it seems all the files are there, but all are "0" size. So obviously start,htm is blank.
It seems to me that when I first got the BBB about 2 or 3 months ago, I got it working without problems, Now I get this.
Might this be a result of the issue with unplugging?

I don't have a mini HDMI cable so I tried by internet.But I can't find the default IP. 168.192.0.1 doesn't work.

I can't ssh without the IP, and I can't get in to change or name the domain.....

Any ideas?

Anders Viljosson

unread,
Sep 4, 2014, 12:37:50 PM9/4/14
to beagl...@googlegroups.com
Hi Chris.
I have the same strange behaviour. See log:

anders@anders-HP-EliteBook-8560p:~$ ssh -v ro...@172.17.11.190
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 172.17.11.190 [172.17.11.190] port 22.
debug1: Connection established.
debug1: identity file /home/anders/.ssh/id_rsa type 1
debug1: identity file /home/anders/.ssh/id_rsa-cert type -1
debug1: identity file /home/anders/.ssh/id_dsa type -1
debug1: identity file /home/anders/.ssh/id_dsa-cert type -1
debug1: identity file /home/anders/.ssh/id_ecdsa type -1
debug1: identity file /home/anders/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/anders/.ssh/id_ed25519 type -1
debug1: identity file /home/anders/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2

The ubunto client just sits and wait forever. Strange. I have tried to delete the host key on the server and reboot but the behaviour is identical. The beaglebone otherwize seems to run without problems. Any idéas would be greatly appreciated.

/Anders V
Reply all
Reply to author
Forward
0 new messages