Migrate to ed25519 key, change id_rsa to identity file name

This commit is contained in:
Václav Valíček 2020-05-17 10:38:33 +02:00
parent bf20dd04c3
commit bfda197c4d
No known key found for this signature in database
GPG Key ID: 91AA271095BD0100
2 changed files with 4 additions and 4 deletions

View File

@ -13,6 +13,6 @@ function prepareGitAuth(){
# git configure http authenticator
git config --global credential.helper "store --file=$confdir/git-credentials"
# git configure ssh auth
git config --global core.sshcommand "ssh -i $confdir/ssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -q"
git config --global core.sshcommand "ssh -i $confdir/ssh/identity -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -q"
}

View File

@ -93,10 +93,10 @@ function createDetectorConfig(){
function generateSSHKey(){
# generates ssh key with $1 path and $2 description
local keyfile=$1/id_rsa
local keyfile=$1/identity
local description=$2
echo "Creating SSH deployment key.."
ssh-keygen -f $keyfile -b 4096 -C "$description" -N ""
ssh-keygen -f $keyfile -t ed25519 -C "$description" -N ""
echo
echo "Public key is:"
echo "-----------------------------------------------------"
@ -196,7 +196,7 @@ fi
if [[ "$read_ssh" =~ ^[Uu]$ ]]
then
# load key
reuseSSHKey $root/config/auth/ssh/id_rsa
reuseSSHKey $root/config/auth/ssh/identity
fi