Giter Site home page Giter Site logo

acces.sh's Introduction

What is acces.sh?

This provides a very simple way to fetch public keys and generate an authorized_keys file. The motivation came from wanting to give my GitHub Team access to servers automatically by grabbing their public keys from their profiles.

Currently, we have support for GitHub teams, however, I would like to support other services (such as GitLab).

Dependencies

Usage

Generate a token and be sure to give it the permission read:org

Read org and team membership

./acces.sh --gh-token TOKEN --gh-org ORG --gh-team TEAM

By default, we write to /tmp/authorized_keys; however, you can override it with --keyfile /path/to/authorized_keys

Security Risks

Since we by default create a file at /tmp/authorized_keys, this poses a potential security threat on multi-user servers. See #2 for more information.

Alternatives

We found a few packages to solve this problem, but we were looking for something with simpler dependencies.

acces.sh's People

Contributors

fatboyxpc avatar

Watchers

 avatar  avatar

acces.sh's Issues

Security Risk

This script works by creating a temporary file in /tmp rather than writing directly to the authorized_keys file (typically found in ~/.ssh/authorized_keys). The reason we chose to do this is so that we do not completely clobber the existing authorized_keys file in the event something goes wrong. Since all users have access to /tmp, that means /tmp/authorized_keys is able to be modified in any way between the time it gets created from this script and then moved to the appropriate place.

This is really only an issue when servers have multiple users with different permissions (such as a shared hosting server).

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.