Code Monkey home page Code Monkey logo

essh_agent_proxy's Introduction

essh_agent_proxy

Problem

the ssh-add(1) manual says

"After loading a private key, ssh-add will try to load corresponding certificate information from the filename obtained by appending -cert.pub to the name of the private key file."

A certificate in the ssh-agent(1), can be used on any host the ssh-agent has been forwarded to.

When a pkcs11 provider is added to the ssh-agent(1), certificates can be used by the ssh client if specified with the CertificateFile directive or found at the default locations (for the key types provided by the added pkcs11 provider).

In order to use a certificate with a pkcs11 provided key on a host to which the ssh-agent has been forwarded to; the certificate file has to exist on the host (at the default location or at a location specified with the CertificateFile directive).

Solution (not here!)

  1. patch ssh-agent(1): in process_add_identity() of ssh-agent.c, allow to add certificates if a matching private key is already present
  2. extend ssh-add(1) add new option -X file which parses the certificate from file and adds it to the ssh-agent(1)

Hack (here)

essh_agent_proxy:

  • proxy SSH_AUTH_SOCK
  • intercept SSH2_AGENT_IDENTITIES_ANSWER messages
  • add entries for all certificates that match a (key-) identity in the answer

Build

$ rebar3 escriptize

Run

$ ./essh_agent_proxy

essh_agent_proxy's People

Contributors

sg2342 avatar

Watchers

 avatar

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.