summaryrefslogtreecommitdiff
path: root/EndoForge/openssh/AuthorizedKeysCommand
diff options
context:
space:
mode:
Diffstat (limited to 'EndoForge/openssh/AuthorizedKeysCommand')
-rwxr-xr-xEndoForge/openssh/AuthorizedKeysCommand21
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
7fingerprint=$3
8authline="$4 $5"
9
10username=$(id -un)
11userhome=$(getent passwd $(id -un) | (IFS=: read _ _ _ _ _ home _ && echo "$home"))
12
13case "$userhome" in
14 '' | *"'"* ) exit ;;
15esac
16
17usercommand=$userhome/.ssh/AnonymousAccessCommand
18
19[ -x "$usercommand" ] || exit
20
21printf 'command="%s",no-port-forwarding %s\n' "$usercommand $fingerprint" "$authline"