summaryrefslogtreecommitdiff
path: root/EndoForge/openssh/AuthorizedKeysCommand
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-10-24 06:15:10 -0400
committerAndrew Cady <d@cryptonomic.net>2021-10-24 06:18:45 -0400
commit5e1f460dd3bf6288893ae61429a94dd90d19cdfb (patch)
treec0811cf81cbdcad19d0f7bd84b26350ad3835310 /EndoForge/openssh/AuthorizedKeysCommand
parent187db8e649641aa64dc49c29ea6bbeba1f7cabf7 (diff)
Removing run-sshd script
I realized that if you are running `sshd` as a user, then you can just use `ForceCommand=` directly in the `sshd_config`. This eliminates the need for fakeroot. And that simplifies the setup enough so that the `openssh/` directory can go away.
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"