diff options
Diffstat (limited to 'EndoForge/openssh/AuthorizedKeysCommand')
-rwxr-xr-x | EndoForge/openssh/AuthorizedKeysCommand | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/EndoForge/openssh/AuthorizedKeysCommand b/EndoForge/openssh/AuthorizedKeysCommand deleted file mode 100755 index 0e6d285..0000000 --- a/EndoForge/openssh/AuthorizedKeysCommand +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # Modified AuthorizedKeysCommand for running OpenSSH as unprivileged user. | ||
3 | # | ||
4 | # Uses the home directory of the calling user (ascertained through "id -un") | ||
5 | # instead of the authenticated user. | ||
6 | |||
7 | fingerprint=$3 | ||
8 | authline="$4 $5" | ||
9 | |||
10 | username=$(id -un) | ||
11 | userhome=$(getent passwd $(id -un) | (IFS=: read _ _ _ _ _ home _ && echo "$home")) | ||
12 | |||
13 | case "$userhome" in | ||
14 | '' | *"'"* ) exit ;; | ||
15 | esac | ||
16 | |||
17 | usercommand=$userhome/.ssh/AnonymousAccessCommand | ||
18 | |||
19 | [ -x "$usercommand" ] || exit | ||
20 | |||
21 | printf 'command="%s",no-port-forwarding %s\n' "$usercommand $fingerprint" "$authline" | ||