Giter Site home page Giter Site logo

lassh's Introduction

Clove Hitch Logo

Lassh

An open source, MIT-licensed command line tool for managing per-project ssh configs.

Using a ssh config

ssh allows the use of a config plaintext file, usually located in ~/.ssh/config, that allows you to customize ssh in a whole host (heh) of ways. One primary use is the creation of aliases for hosts.

However, a single global config file for ssh can quickly become unwieldy and messy (motivating stack exchange).

Introducing Lassh

A CLI to manage your global ssh config and to allow for per-project configurations.

Installation

Lassh requires Python 3. Run pip install lassh. If you haven't already, check out pyenv for python version management and pipenv for dependency management, though they aren't neccesary for using Lassh.

Getting Started

  1. cd into your project (or lab or class or secret government R&D group) directory that you want to configure ssh for.

Initializing Lassh

  1. lassh init will create a global config and a project lassh.config (if they don't already exist). Note: lassh.config files are valid plaintext .ssh/config files. Lassh will then link your new or existing lassh.config to the global config! But you don't have any new hosts to connect to...

Adding Hosts

  1. lassh addhost beepboop computer.dartmouth.edu stevenchun adds a host now called beepboop that points to [email protected]. You can also specify a path to identity keys using the --key option and a port with the --port option. If you leave the user out, it will default to root.

It's important to remember that while Lassh allows you to distribute your config files, the ssh alias namespace is global so you can't have the same alias in two different lassh.config files.

Deleting Hosts

  1. lassh deletehost beepboop deletes the host we just made from our local lassh.config. (It does not remove the link from our project lassh.config to the global config)

Teardown

  1. lassh teardown unlinks and deletes the lassh.config in the current directory from the global config. Warning: this deletes all aliases you have in the project's lassh.config

Other Operations

Since each lassh.config is a valid ssh config file, if you want to add an option like LocalForward, simply add the host and manually edit the lassh.config file to add more options (or contribute to add the relevant feature to Lassh!!).

Testing

Tests can be run using python -m unittest test.test_lassh while in the lassh python package directory.

lassh's People

Contributors

stevenrchun avatar

Stargazers

 avatar Alexander Petros  avatar Brian Hie avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

lassh's Issues

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.