Hi Adrian Indeed, they were empty, so removing them and restarting the ssh daemon does fix it. It does worry me a little bit that this happened... so I'll just watch and see if it happens again. Glad I wasn't the only one that hit this problem..
Giordon On Mon, Mar 5, 2018 at 10:26 AM <[email protected]> wrote: > Hi Giordon, > > I've seen this before and I'm not sure what causes it - probably a reboot > during the first sshd attempt to generate the host keys? > > As a result you end up with public/private keys of size 0. > The ssh-keygen -A command will only generate a key pair for missing keys > (zero sized keys are OK!). > > The solution is to delete all keys (*key*), then either restart sshd or > run ssh-keygen -A. > > Regards, > Adrian > > > > [email protected] wrote: ----- > To: "[email protected]" <[email protected]> > From: "Giordon Stark" > Sent by: [email protected] > Date: 03/05/2018 03:39PM > Subject: [meta-xilinx] OpenSSH problems : sshd will not start up because > of keys with invalid format > > > Hi all, > > I'm seeing the following: > > root@gfex-prototype4:~# /etc/init.d/sshd restart > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_rsa_key > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_dsa_key > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_ecdsa_key > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_ed25519_key > sshd: no hostkeys available -- exiting. > > I'm not entirely sure what happened here. I'm using pyro. Is this a known > issue? I tried regenerating using ssh-keygen and this still doesn't seem to > work: > > root@gfex-prototype4:~# /usr/bin/ssh-keygen -A > root@gfex-prototype4:~# ls -lavh /etc/ssh/ > drwxr-xr-x 2 root root 1.0K Feb 27 17:37 . > drwxr-xr-x 28 root root 3.0K Jan 1 1970 .. > -rw-r--r-- 1 root root 540.2K Feb 27 17:17 moduli > -rw-r--r-- 1 root root 1.5K Feb 27 17:17 ssh_config > -rw------- 1 root root 0 Feb 27 17:37 ssh_host_dsa_key > -rw-r--r-- 1 root root 0 Feb 27 17:37 ssh_host_dsa_key.pub > -rw------- 1 root root 0 Feb 27 17:37 ssh_host_ecdsa_key > -rw-r--r-- 1 root root 0 Feb 27 17:37 > ssh_host_ecdsa_key.pub > -rw------- 1 root root 0 Feb 27 17:37 ssh_host_ed25519_key > -rw-r--r-- 1 root root 0 Feb 27 17:37 > ssh_host_ed25519_key.pub > -rw------- 1 root root 0 Feb 27 17:37 ssh_host_rsa_key > -rw-r--r-- 1 root root 0 Feb 27 17:37 ssh_host_rsa_key.pub > -rw-r--r-- 1 root root 3.5K Feb 27 17:37 sshd_config > -rw-r--r-- 1 root root 3.5K Feb 27 17:37 sshd_config_readonly > root@gfex-prototype4:~# /etc/init.d/sshd restart > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_rsa_key > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_dsa_key > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_ecdsa_key > key_load_public: invalid format > Could not load host key: /etc/ssh/ssh_host_ed25519_key > sshd: no hostkeys available -- exiting. > > Thanks, > > Giordon > -- > Giordon Stark > -- > _______________________________________________ > meta-xilinx mailing list > [email protected] > https://lists.yoctoproject.org/listinfo/meta-xilinx > -- Giordon Stark
-- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
