From 456303fce5916ccede022295df2da3eb58e55ee9 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Wed, 11 Jan 2017 13:44:13 +0100 Subject: [PATCH] auto script --- auto.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 auto.sh diff --git a/auto.sh b/auto.sh new file mode 100644 index 0000000..585a0da --- /dev/null +++ b/auto.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + echo "Als root Angemeldet" + +apt-get install git libssl-dev libpam0g-dev zlib1g-dev dh-autoreconf + +cd /opt/ + +git clone https://github.com/shellinabox/shellinabox.git && cd shellinabox + +autoreconf -i + +./configure && make + +cp shellinabox.service /etc/systemd/system/ + +systemctl daemon-reload + +systemctl enable shellinabox.service + +# adduser + +echo adduser webssh + +useradd webssh + +mkdir /home/webssh + +chmod 770 -R /home/webssh + +chown -R webssh /home/webssh + +passwd "webssh <