From 252428f97aa6a8f4e5b612757ce96d2d0d37e2f3 Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Tue, 11 Feb 2020 22:07:01 -0500 Subject: Add chroot target --- scripts/chroot-man.sh | 2 ++ scripts/chroot-prompt.sh | 6 ++++++ scripts/sshd_config | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 scripts/chroot-man.sh create mode 100644 scripts/chroot-prompt.sh create mode 100644 scripts/sshd_config (limited to 'scripts') diff --git a/scripts/chroot-man.sh b/scripts/chroot-man.sh new file mode 100644 index 0000000..9d686f9 --- /dev/null +++ b/scripts/chroot-man.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec mandoc /usr/share/man/man1/catgirl.1 | LESSSECURE=1 less diff --git a/scripts/chroot-prompt.sh b/scripts/chroot-prompt.sh new file mode 100644 index 0000000..3b43841 --- /dev/null +++ b/scripts/chroot-prompt.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -eu + +printf 'Name: ' +read -r nick rest +exec catgirl -n "$nick" -s "$nick" "$@" diff --git a/scripts/sshd_config b/scripts/sshd_config new file mode 100644 index 0000000..4669f7f --- /dev/null +++ b/scripts/sshd_config @@ -0,0 +1,13 @@ +UsePAM no + +Match User chat + PasswordAuthentication yes + PermitEmptyPasswords yes + ChrootDirectory /home/chat + ForceCommand catgirl-prompt + + AllowAgentForwarding no + AllowTcpForwarding no + AllowStreamLocalForwarding no + MaxSessions 1 + X11Forwarding no -- cgit 1.4.1-2-gfad0