ssh not working on beaglebone after flashing eMMC

207 views
Skip to first unread message

malkowki

unread,
Jun 6, 2016, 9:35:28 AM6/6/16
to BeagleBoard
Dear,

It appears that I cannot ssh my BBB REVC after having flashed my eMMC using the the Robert Nelson script  bbb-eMMC-flasher-eewiki-ext4.sh
My kernel version is 4.1.21-bone-rt-r20.
I have checked the etc/ssh/ directory and I could see that all the ssh_host ... files are gone as a result that I cannot establich any ssh connection to the board via the port22 while I can ping the board and access the apache webserver.

Is there a way to recover all this files so that I can restore the SSH connection?

thanks in advance for a reply.
 

Robert Nelson

unread,
Jun 6, 2016, 9:51:02 AM6/6/16
to Beagle Board, Beninio Mbila
They should be auto-generated on first bootup:

bbb-eMMC-flasher-eewiki-ext4.sh, set's the trigger file: /etc/ssh/ssh.regenerate

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/bbb-eMMC-flasher-eewiki-ext4.sh#L342-L346

Then the script on bootup that see's that, will delete /etc/ssh/* and
regenerated it via:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/generic-startup.sh#L12-L33

Regards,

--
Robert Nelson
https://rcn-ee.com/

malkowki

unread,
Jun 6, 2016, 10:33:46 AM6/6/16
to BeagleBoard, bmb.tec...@gmail.com
Hello Robert,

It looks like some steps failed since I can see that under /etc/ssh there are only 4 files moduli  ssh_config  sshd_config and ssh.regenerate.
Is there a way to regenerate the missing files or repeat the  bbb-eMMC-flasher-eewiki?

Robert Nelson

unread,
Jun 6, 2016, 10:35:41 AM6/6/16
to Beagle Board, Beninio Mbila
On Mon, Jun 6, 2016 at 9:33 AM, malkowki <bmb.tec...@gmail.com> wrote:
> Hello Robert,
>
> It looks like some steps failed since I can see that under /etc/ssh there
> are only 4 files moduli ssh_config sshd_config and ssh.regenerate.
> Is there a way to regenerate the missing files or repeat the
> bbb-eMMC-flasher-eewiki?


sudo dpkg-reconfigure openssh-server
sync
sudo rm -f /etc/ssh/ssh.regenerate

malkowki

unread,
Jun 7, 2016, 3:06:27 AM6/7/16
to BeagleBoard, bmb.tec...@gmail.com
Hi Robert,

I have tried the command line as you advise but this time I got the followng error:

/usr/sbin/dpkg-reconfigure: line 6: syntax error near unexpected token `{'
/usr/sbin/dpkg-reconfigure: line 6: `
if (exists $ENV{DEBCONF_USE_CDEBCONF} and $ENV{DEBCONF_USE_CDEBCONF} ne '') {'

I have searched a solution on the internet but I couldn't find it any idea how to solve it?

malkowki

unread,
Jun 7, 2016, 3:19:37 AM6/7/16
to BeagleBoard, bmb.tec...@gmail.com
I have tried
sudo apt-get update && sudo apt-get -f install

and I goy issue like below:
Saisissez le code ici...Hit http://repos.rcn-ee.com jessie InRelease
Ign http://ftp.us.debian.org jessie InRelease
Hit http://security.debian.org jessie/updates InRelease                
Hit http://ftp.us.debian.org jessie-updates InRelease                  
Get:1 http://repos.rcn-ee.com jessie/main armhf Packages [477 kB]              
Get:2 http://security.debian.org jessie/updates/main armhf Packages [299 kB]  
Hit http://ftp.us.debian.org jessie Release.gpg                                
Get:3 http://ftp.us.debian.org jessie-updates/main armhf Packages [17.4 kB]    
Get:4 http://ftp.us.debian.org jessie-updates/contrib armhf Packages [20 B]    
Get:5 http://ftp.us.debian.org jessie-updates/non-free armhf Packages [450 B]
Get:6 http://security.debian.org jessie/updates/contrib armhf Packages [994 B]
Hit http://ftp.us.debian.org jessie Release                                
Get:7 http://security.debian.org jessie/updates/non-free armhf Packages [20 B]
Get:8 http://ftp.us.debian.org jessie/main armhf Packages [8,832 kB]      
Get:9 http://ftp.us.debian.org jessie/contrib armhf Packages [44.7 kB]        
Get:10 http://ftp.us.debian.org jessie/non-free armhf Packages [74.6 kB]      
Fetched 9,747 kB in 31s (307 kB/s)                                            
Reading package lists... Done
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  perl perl
-base perl-modules
Suggested packages:
  perl
-doc libterm-readline-gnu-perl libterm-readline-perl-perl libb-lint-perl
  libcpanplus
-dist-build-perl libcpanplus-perl libfile-checktree-perl
  liblog
-message-simple-perl liblog-message-perl libobject-accessor-perl
Recommended packages:
  rename libarchive
-extract-perl libmodule-pluggable-perl libpod-latex-perl
  libterm
-ui-perl libtext-soundex-perl libcgi-pm-perl libmodule-build-perl
The following packages will be REMOVED:
  openssh
-server
The following NEW packages will be installed:
  perl
-base
The following packages will be upgraded:
  perl perl
-modules
2 upgraded, 1 newly installed, 1 to remove and 42 not upgraded.
1 not fully installed or removed.
Need to get 5,724 kB of archives.
After this operation, 3,255 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.us.debian.org/debian/ jessie/main perl-modules all 5.20.2-3+deb8u5 [2,546 kB]
Get:2 http://ftp.us.debian.org/debian/ jessie/main perl armhf 5.20.2-3+deb8u5 [2,052 kB]
Get:3 http://ftp.us.debian.org/debian/ jessie/main perl-base armhf 5.20.2-3+deb8u5 [1,127 kB]
Fetched 5,724 kB in 7s (756 kB/s)                                              
/usr/sbin/dpkg-preconfigure: 6: /usr/sbin/dpkg-preconfigure: BEGIN: not found
/usr/sbin/dpkg-preconfigure: 1: eval: qq{: not found
/usr/sbin/dpkg-preconfigure: 8: /usr/sbin/dpkg-preconfigure: use: not found
/usr/sbin/dpkg-preconfigure: 9: /usr/sbin/dpkg-preconfigure: use: not found
/usr/sbin/dpkg-preconfigure: 10: /usr/sbin/dpkg-preconfigure: Syntax error: "(" unexpected
(Reading database ... 249884 files and directories currently installed.)
Removing openssh-server (1:6.7p1-5+deb8u2) ...
/usr/bin/perl: 1: /usr/bin/perl: ELF : not found
/usr/bin/perl: 3: /usr/bin/perl: Syntax error: "(" unexpected
dpkg
: error processing package openssh-server (--remove):
 subprocess installed post
-removal script returned error exit status 2
Errors were encountered while processing:
 openssh
-server



William Hermans

unread,
Jun 7, 2016, 3:41:58 PM6/7/16
to beagl...@googlegroups.com
The problem is not openssh-server, the problem is your system is somehow corrupt. Which can happen from a bad install. It ended prematurely for a number of reasons. *OR* you started screwing around with a good install, and messed it up.

Start over again, and if the image you have does the same thing again, get a different image.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/6d800a98-6914-49bf-8434-8242ca151941%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

malkowki

unread,
Jun 8, 2016, 8:08:32 AM6/8/16
to BeagleBoard
Hi William,

thanks for replying. Indeed something went wrong with some driver update as a consequence that my system completely has been screwed up.
I have just rebuild another image from the native Kernel source and booting the board from SD card.

Cheers,

Beninio
Reply all
Reply to author
Forward
0 new messages