From f84e808df35df6aed980f83d044c194494cabbe6 Mon Sep 17 00:00:00 2001 From: q3aql Date: Sat, 11 Mar 2023 13:04:25 +0100 Subject: [PATCH] Fix function to generate certificate on remote machine (ks-up*) --- src/ks-upa | 4 +--- src/ks-upf | 4 +--- src/ks-upr | 4 +--- src/ks-upv | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ks-upa b/src/ks-upa index 5dbfa67..876d65c 100755 --- a/src/ks-upa +++ b/src/ks-upa @@ -402,9 +402,7 @@ function gen_pem_ssh() { userhost="${USER}" name_host="${HOSTNAME}" echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." - ssh-keygen << EOF - ${userhost} -EOF + echo -e "${userhost}\n\n\n" | ssh-keygen mv ${userhost} ${userhost}-${name_host}.pem mkdir -p ~/.ssh chmod 700 ~/.ssh diff --git a/src/ks-upf b/src/ks-upf index d484579..aeed120 100755 --- a/src/ks-upf +++ b/src/ks-upf @@ -429,9 +429,7 @@ function gen_pem_ssh() { userhost="${USER}" name_host="${HOSTNAME}" echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." - ssh-keygen << EOF - ${userhost} -EOF + echo -e "${userhost}\n\n\n" | ssh-keygen mv ${userhost} ${userhost}-${name_host}.pem mkdir -p ~/.ssh chmod 700 ~/.ssh diff --git a/src/ks-upr b/src/ks-upr index c5f85c5..45cf38a 100755 --- a/src/ks-upr +++ b/src/ks-upr @@ -306,9 +306,7 @@ function gen_pem_ssh() { userhost="${USER}" name_host="${HOSTNAME}" echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." - ssh-keygen << EOF - ${userhost} -EOF + echo -e "${userhost}\n\n\n" | ssh-keygen mv ${userhost} ${userhost}-${name_host}.pem mkdir -p ~/.ssh chmod 700 ~/.ssh diff --git a/src/ks-upv b/src/ks-upv index c8c82ec..01fc335 100755 --- a/src/ks-upv +++ b/src/ks-upv @@ -402,9 +402,7 @@ function gen_pem_ssh() { userhost="${USER}" name_host="${HOSTNAME}" echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." - ssh-keygen << EOF - ${userhost} -EOF + echo -e "${userhost}\n\n\n" | ssh-keygen mv ${userhost} ${userhost}-${name_host}.pem mkdir -p ~/.ssh chmod 700 ~/.ssh