diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-22 15:22:37 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-23 11:17:15 -0400 |
commit | a19dce5c18f6d6370b58aa3b9dd26550a589fc8c (patch) | |
tree | b8625d617d8ad85e0715b36400411f53d9ad1a75 /AuthorizedKeysCommand |
Minimal Git/SSH Rhizome
Requires Sudo access to configure OpenSSH.
It would be possible to run OpenSSH on a non-default port and not
require root access. That is not implemented.
Diffstat (limited to 'AuthorizedKeysCommand')
-rwxr-xr-x | AuthorizedKeysCommand | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/AuthorizedKeysCommand b/AuthorizedKeysCommand new file mode 100755 index 0000000..6e13063 --- /dev/null +++ b/AuthorizedKeysCommand | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/bin/sh | ||
2 | username=$1 | ||
3 | userhome=$2 | ||
4 | fingerprint=$3 | ||
5 | authline="$4 $5" | ||
6 | |||
7 | case "$userhome" in | ||
8 | *'"'*) exit ;; | ||
9 | esac | ||
10 | |||
11 | usercommand=$userhome/.ssh/AnonymousAccessCommand | ||
12 | |||
13 | [ -x "$usercommand" ] || exit | ||
14 | |||
15 | printf 'command="%s",no-port-forwarding %s\n' "$usercommand $fingerprint" "$authline" | ||