[meta-xilinx] OpenSSH problems : sshd will not start up because of keys with invalid format

adrian.thomasset at doulos.com adrian.thomasset at doulos.com
Mon Mar 5 08:26:50 PST 2018


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



-----meta-xilinx-bounces at yoctoproject.org wrote: -----
To: "meta-xilinx at yoctoproject.org" <meta-xilinx at yoctoproject.org>
From: "Giordon Stark" 
Sent by: meta-xilinx-bounces at yoctoproject.org
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 at 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 at gfex-prototype4:~# /usr/bin/ssh-keygen -A
root at 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 at 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
meta-xilinx at yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20180305/d8728bd3/attachment-0001.html>


More information about the meta-xilinx mailing list