GithubHelp home page GithubHelp logo

Comments (2)

jacobdotcosta avatar jacobdotcosta commented on June 2, 2024

The problem isn't with the installation. I've added a while back a default ssh key so we aren't forced to generate a new one on each VM. This default uses 2 ssh key files with names id_rsa_snowdrop_hetzner and id_rsa_snowdrop_hetzner.pub. If you create these 2 files with the contents from the passwordstore the process should go ahead without problems.

e.g.

pass show hetzner/id_rsa.pub > ~/.ssh/id_rsa_snowdrop_hetzner.pub
pass show hetzner/id_rsa > ~/.ssh/id_rsa_snowdrop_hetzner
chmod 600 ~/.ssh/id_rsa_snowdrop_hetzner.pub ~/.ssh/id_rsa_snowdrop_hetzner

@cmoulliard

from k8s-infra.

cmoulliard avatar cmoulliard commented on June 2, 2024

I adapted my script to ssh to the VM to use the common team key

#!/usr/bin/env bash

#set -x

CLOUD_PROVIDER=$1
VM_NAME=$2
SSH_KEY=~/.ssh/id_rsa_snowdrop_${CLOUD_PROVIDER}_${VM_NAME}

echo ">>> Copy the team private key"
echo "$(PASSWORD_STORE_DIR=~/.password-store-snowdrop pass show ${CLOUD_PROVIDER}/id_rsa)" > ~/.ssh/id_rsa_snowdrop_${CLOUD_PROVIDER}_${VM_NAME}
chmod 600 ~/.ssh/id_rsa_snowdrop_${CLOUD_PROVIDER}_${VM_NAME}

# Extract the IP, PORT and USER to be used to ssh
IP=$(PASSWORD_STORE_DIR=~/.password-store-snowdrop pass show ${CLOUD_PROVIDER}/${VM_NAME}/ansible_ssh_host | awk 'NR==1{print $1}')
PORT=$(PASSWORD_STORE_DIR=~/.password-store-snowdrop pass show ${CLOUD_PROVIDER}/${VM_NAME}/ansible_ssh_port | awk 'NR==1{print $1}')
USER=$(PASSWORD_STORE_DIR=~/.password-store-snowdrop pass show ${CLOUD_PROVIDER}/${VM_NAME}/os_user | awk 'NR==1{print $1}')

echo "# ssh -i ${SSH_KEY} ${USER}@${IP} -p ${PORT}"
ssh -i ${SSH_KEY} ${USER}@${IP} -p ${PORT} "${@:3}"

@jacobdotcosta

from k8s-infra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.