/saxifrage

A CLI tool to manage your SSH keys

Primary LanguageGoMIT LicenseMIT

Saxifrage

Saxifrage Go Report Card GitHub

A CLI tool to manage your SSH keys

Install

$ curl -fsSL https://raw.githubusercontent.com/mickaelvieira/saxifrage/stable/scripts/install | sh

Upgrade

$ sax upgrade

Bash completion

$ sax completion > sax.sh
$ sudo mv ./sax.sh /usr/share/bash-completion/completions/sax
$ sudo chown root.root /usr/share/bash-completion/completions/sax
$ sudo chmod 0644 /usr/share/bash-completion/completions/sax
$ source /usr/share/bash-completion/completions/sax

Usage

$ sax

 NAME:
  Saxifrage - A CLI tool to manage your SSH keys

 USAGE:
  sax [command]

 COMMANDS:

  completion    Generate bash completion
  dump          Dump your SSH configuration
  gen           Generate interactively a SSH key (rsa, dsa, ecdsa, ed25519)
  help          Show this help
  ls            List SSH configuration sections
  rm            Remove interactively a section and its related SSH keys
  upgrade       Upgrade Saxifrage
  version       Display the application version

Running Saxifrage in a container

Docker container

Build the docker image

$ make docker-build

Run the container with docker

$ docker run \
    -v /etc/ssh/ssh_config:/etc/ssh/ssh_config \
    -v ~/.ssh/config:/.ssh/config \
    --tty \
    --name sax \
    --rm \
    saxifrage ls

Buildah Container

Build the buildah image

$ make buildah-build

Run the container with podman

$ podman run \
    -v /etc/ssh/ssh_config:/etc/ssh/ssh_config \
    -v ~/.ssh/config:/.ssh/config \
    --tty \
    --name sax \
    --rm \
    saxifrage:latest ls