Fix function to generate certificate on remote machine (ks-up*)

This commit is contained in:
q3aql 2023-03-11 13:04:25 +01:00
parent 1682255e62
commit f84e808df3
4 changed files with 4 additions and 12 deletions

View File

@ -402,9 +402,7 @@ function gen_pem_ssh() {
userhost="${USER}" userhost="${USER}"
name_host="${HOSTNAME}" name_host="${HOSTNAME}"
echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." echo "" && echo "* Generating .pem file to connect to this machine (${userhost})."
ssh-keygen << EOF echo -e "${userhost}\n\n\n" | ssh-keygen
${userhost}
EOF
mv ${userhost} ${userhost}-${name_host}.pem mv ${userhost} ${userhost}-${name_host}.pem
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh

View File

@ -429,9 +429,7 @@ function gen_pem_ssh() {
userhost="${USER}" userhost="${USER}"
name_host="${HOSTNAME}" name_host="${HOSTNAME}"
echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." echo "" && echo "* Generating .pem file to connect to this machine (${userhost})."
ssh-keygen << EOF echo -e "${userhost}\n\n\n" | ssh-keygen
${userhost}
EOF
mv ${userhost} ${userhost}-${name_host}.pem mv ${userhost} ${userhost}-${name_host}.pem
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh

View File

@ -306,9 +306,7 @@ function gen_pem_ssh() {
userhost="${USER}" userhost="${USER}"
name_host="${HOSTNAME}" name_host="${HOSTNAME}"
echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." echo "" && echo "* Generating .pem file to connect to this machine (${userhost})."
ssh-keygen << EOF echo -e "${userhost}\n\n\n" | ssh-keygen
${userhost}
EOF
mv ${userhost} ${userhost}-${name_host}.pem mv ${userhost} ${userhost}-${name_host}.pem
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh

View File

@ -402,9 +402,7 @@ function gen_pem_ssh() {
userhost="${USER}" userhost="${USER}"
name_host="${HOSTNAME}" name_host="${HOSTNAME}"
echo "" && echo "* Generating .pem file to connect to this machine (${userhost})." echo "" && echo "* Generating .pem file to connect to this machine (${userhost})."
ssh-keygen << EOF echo -e "${userhost}\n\n\n" | ssh-keygen
${userhost}
EOF
mv ${userhost} ${userhost}-${name_host}.pem mv ${userhost} ${userhost}-${name_host}.pem
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh