Git Product home page Git Product logo

docker-ssh-ca-tutorial's Introduction

Docker ssh ca tutorial

Build the docker image

npm run docker:build

Run the script to generate all certificate and ssh config to make the ca setup work

npm run docker:shell
/workspace/scripts/setup.sh

/!\ Don't forget to add the ca host's public key (the last line of the output of the script) in your ~/.ssh/known_hosts, or you'll have to trust the fingerprint manually

Ssh into the docker instance

# In another terminal
npm run ssh

To debug:

npm run debug

CA certificates

In this tutorial, we use two CA keypairs:

  • ca_user that the host will have to trust to accept the incoming ssh connection
  • ca_host that the user will have to trust so that they don't have to verify the fingerprint manually during the first connection

However it is also possible to use a single ca keypair for both usage.

Warning

In this tutorial we will be creating SSH CA to Validate Hosts and Clients.

Normally, the signing keys would not be stored on the ssh server or in a git repo like this. This is for demonstration purposes.

For a more production ready approach see this.

What we want...

We want a simple docker setup, where we create an ssh server from a docker file, provide some keys and certs, and can ssh to it using SSH CA, and not provide a password.

docker-ssh-ca-tutorial's People

Contributors

gjgd avatar

Watchers

 avatar  avatar  avatar

Forkers

gjgd lewisoaten

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.