From 9d35be6acd7c5c6bef72e07382501910aad3ce4b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 16 Jun 2015 10:11:16 +0200 Subject: [PATCH] add script to configure sshd Signed-off-by: Nico Schottelius --- hacking/v3-busybox/sshd_config.sh | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 hacking/v3-busybox/sshd_config.sh diff --git a/hacking/v3-busybox/sshd_config.sh b/hacking/v3-busybox/sshd_config.sh new file mode 100755 index 00000000..10a8f465 --- /dev/null +++ b/hacking/v3-busybox/sshd_config.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$#" -ne 1 ]; then + echo "$0: output directory" + exit 1 +fi + +dir=$1 + +mkdir -p "$dir/etc/ssh" +mkdir -p "$dir/root/.ssh" + +cat << eof > "$dir/etc/ssh/sshd_config" +# cdist generated - do not modify +PermitRootLogin without-password +eof + +cat << eof > "$dir/etc/passwd" +root:x:0:0:root:/root:/bin/bash +nobody:x:99:99:nobody:/:/bin/false +eof + +cat << eof > "$dir/etc/group" +root:x:0:root +nobody:x:99: +eof + +#cat << eof > "$dir/etc/shadow" +#root:x:0:0:root:/root:/bin/bash +#nobody:x:1:::::: +#eof +