Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

danmx/sigil

Repository files navigation

sigil

FOSSA Status Build Status Codacy Badge codecov DeepSource

Description

Sigil is the hub of the Great Wheel, a city at the center of the Outlands, the most balanced of neutral areas at the center of the planes. Also known as the "City of Doors" for the multitude of portals to other planes of existence and the Cage since those portals are the only way in or out, it is the setting for most of Planescape: Torment.

Sigil is an AWS SSM Session manager client. Allowing access to EC2 instances without exposing any ports.

Features

  • configuration files support (TOML, YAML, JSON, etc.)
  • support for different configuration profiles
  • lightweight container image
  • SSH and SCP support

External dependencies

Local

Remote

Documentation

The manual can be found here.

Installation

Homebrew

brew tap danmx/sigil
brew install sigil

or

brew install danmx/sigil/sigil

Docker

docker pull danmx/sigil:0.7

Examples

Usage

Docker:

docker run --rm -it -v "${HOME}"/.sigil:/home/nonroot/.sigil -v "${HOME}"/.aws:/home/.aws danmx/sigil:0.7 list --output-format wide

Binary:

sigil -r eu-west-1 session --type instance-id i-xxxxxxxxxxxxxxxxx

Using with aws-vault:

aws-vault exec AWS_PROFILE -- sigil -r eu-west-1 session --type instance-id i-xxxxxxxxxxxxxxxxx

SSH integration

Add an entry to your ssh_config:

Host i-* mi-*
    IdentityFile /tmp/sigil/%h/temp_key
    IdentitiesOnly yes
    ProxyCommand sigil ssh --port %p --pub-key /tmp/sigil/%h/temp_key.pub --gen-key-pair --os-user %r --gen-key-dir /tmp/sigil/%h/ %h
Host *.compute.internal
    IdentityFile /tmp/sigil/%h/temp_key
    IdentitiesOnly yes
    ProxyCommand sigil ssh --type private-dns --port %p --pub-key /tmp/sigil/%h/temp_key.pub --gen-key-pair --os-user %r --gen-key-dir /tmp/sigil/%h/ %h

and run:

ssh ec2-user@i-123456789

or

Config file

By default configuration file is located in ${HOME}/.sigil/config.toml.

[default]
  type = "instance-id"
  output-format = "wide"
  region = "eu-west-1"
  profile = "dev"
  interactive = true

Changelog

See CHANGELOG.md

Build

Binaries

To build binaries (development and release) run:

bazelisk build //...

To run specific build use:

bazelisk build --config cross:[darwin|linux|windows]_amd64 :[dev|release]

for working Docker image:

bazelisk build --config cross:linux_amd64 :[dev|release]-image

Container image

To only build docker image run:

bazelisk run :dev-image

It'll create a docker image tagged bazel:dev-image.

Contributions

All contributions are welcomed!

Dev Dependencies

Commits

I'm trying to follow Conventional Commits.

Bootstraping

pre-commit install
pre-commit install --hook-type pre-push
bazelisk sync

License

FOSSA Status

Apache 2.0

Considerations

Sigil was inspired by xen0l's aws-gate.