RobertCNelson / bb-kernel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sshd isn't auto generating keys on startup

ghulands opened this issue · comments

Not sure if this is the write project to put this in. I downloaded the eMMC image (https://rcn-ee.com/rootfs/2016-02-11/flasher/BBB-eMMC-flasher-ubuntu-14.04.3-console-armhf-2016-02-11-2gb.img.xz) and got it installed onto the MMC. When it booted up, the SSH was reporting Connection reset by xxx.xxx.xxx.xxx. I found that the sshd keys weren't there. Running sudo ssh-keygen -A fixed it, but they aren't preserved across reboots. I'm not sure what is removing them as the filesystem looks like it is read/write.

/dev/disk/by-uuid/f4bf46ba-aa1e-4fbe-81c7-3e8269c0bf59 / ext4 rw,noatime,errors=remount-ro,data=ordered 0 0

Watch the journal, it should be generated within a minute, is longer now as we try to generate some entropy before hand...

Not seeing it

ubuntu@arm:/etc/ssh$ uptime
22:00:03 up 21 min, 1 user, load average: 0.58, 0.54, 0.29
ubuntu@arm:/etc/ssh$ ls -l
total 248
-rw-r--r-- 1 root root 242091 Apr 14 2014 moduli
-rw-r--r-- 1 root root 1690 Apr 14 2014 ssh_config
-rw-r--r-- 1 root root 2540 Feb 12 03:34 sshd_config
-rw-r--r-- 1 root root 0 Jan 1 2000 ssh.regenerate

Weird, remove the SSH.regenerate file, then it'll keep you new keys, I'll take a look at it later tomorrow when I get back home.

Keys aren't generated at all. After flashing and booting i could not connect through ssh / ethernet.

This is because the /opt/scripts/boot/generic-startup.sh is not added as init script to /etc/init.d/
Maybe there is more which is broken with that image.

@julianhille missing context, whhat "image" are you talking about?

Oh, i'm done with 14.04's..

http://elinux.org/BeagleBoardUbuntu

Regards,

Ah ok, you may close then. But maybe there should be any info about that. :)