From 608a3e4081f5b15f2c20f17b1e6313e4a595b2b8 Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Fri, 8 Jul 2022 02:22:01 +0000 Subject: [PATCH] add workdirbykey to readme --- README.md | 1 + plugin/workingdirbykey/README.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 plugin/workingdirbykey/README.md diff --git a/README.md b/README.md index 4c37728b..f46b4e32 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/plugin/workingdirbykey/README.md b/plugin/workingdirbykey/README.md new file mode 100644 index 00000000..9812e651 --- /dev/null +++ b/plugin/workingdirbykey/README.md @@ -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. \ No newline at end of file