Re: fai-setup: ECDSA-key missing in known_hosts

Christian Meyer <[email protected]>
Newsgroups gmane.linux.debian.fai
Message-ID <[email protected]>
Am Samstag, dem 23.10.2021 um 11:51 +0200 schrieb Thomas Lange:
> > > > > > On Fri, 22 Oct 2021 23:21:07 +0200, Christian Meyer <
> > > > > > [email protected]> said:
>
>     > This file is created by /usr/sbin/fai-setup and I found that
> the rsa-
>     > key and the ed25519-key are recognised and handled well (except
> some
>     > obfuscation), but the ecdsa-key still is missing.
>
> You are right, fai-setup has no code for copying the
> ecdsa-key. This is a bug, it's not made on purpose.

Thank you for your answer.
I don't know if $LOGUSER needs an ECDSA-key, too, but I modified fai-
setup as attached and now it 'works for me' ;)

Christian
fai-setup.ecdsa.diff (text/x-patch, 450 B)
110a111,115
>         [ -f $sshdir/id_ecdsa ] || {
>             ssh-keygen -t ecdsa -N '' -f $sshdir/id_ecdsa -C "$LOGUSER@$HOSTNAME"
>             cat $sshdir/id_ecdsa.pub >> $sshdir/authorized_keys
>         }
> 
115a121
>             [ -f /etc/ssh/ssh_host_ecdsa_key.pub ] && ECDSASERVER=$(sed -e "s/= .*$/=/" /etc/ssh/ssh_host_ecdsa_key.pub )
123a130
>                 [ -z "$ECDSASERVER" ] || echo "$hname $ECDSASERVER" >> $sshdir/known_hosts
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.