Skip to content

Instantly share code, notes, and snippets.

@joshua-in-boots
joshua-in-boots / replace-default-id
Last active November 29, 2020 22:59
VM bootstraping script to replace login account of AWS Ubuntu instance
#!/bin/bash
# Default login ID of VM Instance.
# https://docs.aws.amazon.com/ko_kr/AWSEC2/latest/UserGuide/managing-users.html
OLD_ID=ubuntu
# Name a new ID at your taste
NEW_ID=joshua
NEW_HOME=/home/$NEW_ID
AUTH_KEY=$USER_HOME/.ssh/authorized_keys
@joshua-in-boots
joshua-in-boots / Vault-ssh-ca-README.md
Created December 4, 2019 00:03 — forked from kawsark/Vault-ssh-ca-README.md
A guide for configuring Vault's SSH-CA

SSH CA use-case with Vault

In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.

Prerequisites

  • This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
  • The client system must be able to reach the Vault server and the OpenSSH server.
  • We will refer to these systems respectively as:
  • VAULT_SERVER

Keybase proof

I hereby claim:

  • I am joshua-in-boots on github.
  • I am zosh (https://keybase.io/zosh) on keybase.
  • I have a public key ASBlUDzukQQHrfkE0-4Rlkrg9rjdFYepPVIpybnqcBxBaAo

To claim this, I am signing this object: