An open source, MIT-licensed command line tool for managing per-project ssh configs.
Project description
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
cdinto your project (or lab or class or secret government R&D group) directory that you want to configure ssh for.
Initializing Lassh
lassh initwill create a global config and a projectlassh.config(if they don't already exist). Note:lassh.configfiles are valid plaintext.ssh/configfiles. Lassh will then link your new or existinglassh.configto the global config! But you don't have any new hosts to connect to...
Adding Hosts
lassh addhost beepboop computer.dartmouth.edu stevenchunadds a host now calledbeepboopthat points tostevenchun@computer.dartmouth.edu. You can also specify a path to identity keys using the--keyoption and a port with the--portoption. If you leave the user out, it will default toroot.
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
lassh deletehost beepboopdeletes the host we just made from our locallassh.config. (It does not remove the link from our projectlassh.configto the global config)
Teardown
lassh teardownunlinks and deletes thelassh.configin the current directory from the global config. Warning: this deletes all aliases you have in the project'slassh.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lassh-0.1.1.tar.gz.
File metadata
- Download URL: lassh-0.1.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3937aa802dfc2ecd1566e5593a7a5decd3b9a408f0645360ab5758bcabaa5347
|
|
| MD5 |
1e423e992ee51f07d49eb0edae3bd610
|
|
| BLAKE2b-256 |
88aada225ca3d9ee107d1f2865d1239a44174da8ebc9ef3ae2350d8d8abb5dfa
|
File details
Details for the file lassh-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lassh-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e076971802b4cc9f91b0e8c29fd071f10c93b9b050147f2f5bef894c696b0ce3
|
|
| MD5 |
07a69101d2a52c1598b1d7a03104cee3
|
|
| BLAKE2b-256 |
1795a4702a54a96eb4bb6520bb835be923a13bccffb7cac19de737f2f6355a14
|