Migrate to ed25519 key, change id_rsa to identity file name
This commit is contained in:
parent
bf20dd04c3
commit
bfda197c4d
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user