diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-23 12:36:42 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-23 12:36:42 -0400 |
commit | 1c35165652fae8410eec8c8bb31ef86ddec8ec6a (patch) | |
tree | 2575162cc25c9100576735ce199e2fb7de128b22 /src/AuthorizedKeysCommand | |
parent | 3781d6ad65e30c6fbfdd6964301f24adcfc95286 (diff) |
move files to src/
Diffstat (limited to 'src/AuthorizedKeysCommand')
-rwxr-xr-x | src/AuthorizedKeysCommand | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/AuthorizedKeysCommand b/src/AuthorizedKeysCommand new file mode 100755 index 0000000..6e13063 --- /dev/null +++ b/src/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" | ||