Remove argument to ssh-keygen for key size

Latest crypto-policies enforce a minimum key size of 2048 via:

$ grep RSAMinSize /etc/crypto-policies/back-ends/openssh.config
RSAMinSize 2048

Since 1024 keys are already considered insecure let's have
ssh-keygen pick a more secure default.

Change-Id: Ic30c9e1f29ef5b9bf03569300afa4245bc0eb556
This commit is contained in:
Luca Miccini 2022-08-25 11:52:09 +02:00
parent 8e34b58d70
commit aa424abf03

View File

@ -44,7 +44,7 @@ if [ ! -f $HOMEDIR/.ssh/authorized_keys ]; then
fi
if [ ! -f $HOMEDIR/.ssh/id_rsa ]; then
ssh-keygen -b 1024 -N '' -f $HOMEDIR/.ssh/id_rsa
ssh-keygen -N '' -f $HOMEDIR/.ssh/id_rsa
fi
if ! grep "$(cat $HOMEDIR/.ssh/id_rsa.pub)" $HOMEDIR/.ssh/authorized_keys; then