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 configure http authenticator
|
||||||
git config --global credential.helper "store --file=$confdir/git-credentials"
|
git config --global credential.helper "store --file=$confdir/git-credentials"
|
||||||
# git configure ssh auth
|
# 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(){
|
function generateSSHKey(){
|
||||||
# generates ssh key with $1 path and $2 description
|
# generates ssh key with $1 path and $2 description
|
||||||
local keyfile=$1/id_rsa
|
local keyfile=$1/identity
|
||||||
local description=$2
|
local description=$2
|
||||||
echo "Creating SSH deployment key.."
|
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
|
||||||
echo "Public key is:"
|
echo "Public key is:"
|
||||||
echo "-----------------------------------------------------"
|
echo "-----------------------------------------------------"
|
||||||
|
@ -196,7 +196,7 @@ fi
|
||||||
if [[ "$read_ssh" =~ ^[Uu]$ ]]
|
if [[ "$read_ssh" =~ ^[Uu]$ ]]
|
||||||
then
|
then
|
||||||
# load key
|
# load key
|
||||||
reuseSSHKey $root/config/auth/ssh/id_rsa
|
reuseSSHKey $root/config/auth/ssh/identity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user