summaryrefslogtreecommitdiff
path: root/EndoForge/openssh
diff options
context:
space:
mode:
Diffstat (limited to 'EndoForge/openssh')
-rwxr-xr-xEndoForge/openssh/AuthorizedKeysCommand21
-rw-r--r--EndoForge/openssh/Makefile7
-rwxr-xr-xEndoForge/openssh/run-sshd32
-rw-r--r--EndoForge/openssh/sshd_config15
4 files changed, 0 insertions, 75 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"
diff --git a/EndoForge/openssh/Makefile b/EndoForge/openssh/Makefile
deleted file mode 100644
index ae39ed2..0000000
--- a/EndoForge/openssh/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
1
2run:
3 ./run-sshd -D -e -f ~/.ssh/sshd_config
4
5install:
6 install -m0600 sshd_config -t ~/.ssh
7 install -m0755 AuthorizedKeysCommand -t ~/.ssh
diff --git a/EndoForge/openssh/run-sshd b/EndoForge/openssh/run-sshd
deleted file mode 100755
index 20e82d8..0000000
--- a/EndoForge/openssh/run-sshd
+++ /dev/null
@@ -1,32 +0,0 @@
1#!/bin/sh
2# Fix file ownership with fakeroot so that OpenSSH will run as a user.
3#
4# The ownership is not really changed on disk, but 'chmod go-w' might actually
5# change permissions on disk.
6
7case "$LD_PRELOAD" in
8 libfakeroot-sysv.so) ;;
9 '') exec fakeroot -- "$0" "$@" ;;
10 *) exit 1 ;;
11esac
12
13fixperms()
14{
15 set -- "$1"
16 local p="$1" oldp=
17 while [ "$p" != "$oldp" ]
18 do
19 oldp=$p
20 p=${p%/*}/
21 set -- "$@" "$p"
22 done
23 chown root:root "$@"
24 chmod go-w "$@"
25}
26
27fixperms "$HOME"/.ssh
28
29PATH=/sbin:/usr/sbin:$PATH
30cmd="$(which sshd) $*"
31runuser -u "$USER" -- sh -c "$cmd"
32
diff --git a/EndoForge/openssh/sshd_config b/EndoForge/openssh/sshd_config
deleted file mode 100644
index 2273805..0000000
--- a/EndoForge/openssh/sshd_config
+++ /dev/null
@@ -1,15 +0,0 @@
1Port=22022
2
3HostKey=/home/u/.ssh/id_ed25519
4PidFile=/home/u/.ssh/sshd.pid
5
6AuthorizedKeysCommandUser=u
7AuthorizedKeysCommand=/home/u/.ssh/AuthorizedKeysCommand %u %h %f "%t %k"
8ExposeAuthInfo=yes
9
10AuthenticationMethods publickey
11AcceptEnv LANG LC_*
12Subsystem sftp /usr/lib/openssh/sftp-server
13UsePAM no
14PermitTTY no
15ChrootDirectory=none