diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-23 18:08:40 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-23 18:08:40 -0400 |
commit | f94c5c4222cf5edf42193dc4dd3010ba1f8b53f2 (patch) | |
tree | 7b4f554d6b1078e9e4f46f3f3e2e3a4635f6889d /EndoForge/openssh/runsshd.sh | |
parent | 8962879681b1a1caba15c3d5191bc9619993758a (diff) |
got user-mode sshd working
Diffstat (limited to 'EndoForge/openssh/runsshd.sh')
-rwxr-xr-x | EndoForge/openssh/runsshd.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/EndoForge/openssh/runsshd.sh b/EndoForge/openssh/runsshd.sh new file mode 100755 index 0000000..1eff668 --- /dev/null +++ b/EndoForge/openssh/runsshd.sh | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | set -- | ||
3 | dirs=$HOME | ||
4 | p=$HOME | ||
5 | while [ "$p" != "${p%/*}" ] | ||
6 | do | ||
7 | p=${p%/*} | ||
8 | dirs="$dirs $p/" | ||
9 | done | ||
10 | |||
11 | chown root:root $dirs | ||
12 | chmod go-w $dirs | ||
13 | |||
14 | cmd="/usr/sbin/sshd -D -e -f $HOME/.ssh/sshd_config -h $HOME/.ssh/id_ed25519" | ||
15 | /sbin/runuser -u u -- sh -c "set -x; $cmd" | ||
16 | |||