add workdirbykey to readme

This commit is contained in:
Boshi Lian 2022-07-08 02:22:01 +00:00
parent 7f4c3441e1
commit 608a3e4081
2 changed files with 22 additions and 0 deletions

View file

@ -84,6 +84,7 @@ sudo ./out/sshpiperd --log-level=trace ./out/simplemath -- ./out/fixed --target
Plugin list
* [workingdir](plugin/workingdir/) 🔀: `/home`-like directory to managed upstreams routing by sshpiped.
* [workingdirbykey](plugin/workingdirbykey/) 🔀: same as `workingdir` but uses public key to route.
* [azdevicecode](plugin/azdevicecode/) 🔒: ask user to enter [azure device code](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code) before login
* [fixed](plugin/fixed/) 🔀: fixed targetting the dummy sshd server
* [simplemath](plugin/simplemath/) 🔒: ask for very simple math question before login, demo purpose

View file

@ -0,0 +1,21 @@
# Publickey based Working Directory plugin for sshpiperd
This plugin is smilar to the [workingdir](../workingdir/) plugin, but it uses public key to route.
workingdir tree
```
├── git
│ ├── bitbucket
│ │ └── sshpiper_upstream
│ ├── github
│ │ ├── authorized_keys
│ │ ├── id_rsa
│ │ └── sshpiper_upstream
│ └── gitlab
│ └── sshpiper_upstream
├── linode....
```
The plugin will search across all sub directories of the `username` directory to see if the `downstream` key is in `authorized_keys` file.
The first matched sub directory will be used to route to the upstream.