Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Shellinabox fix

19 Jun 2022 »

https://github.com/shellinabox/shellinabox/issues/282

shellinabox/vt100.js

clipboard = clipboard.replaceAll("\r", "");

yum install git openssl-devel pam-devel zlib-devel autoconf automake libtool make
yum install perl-IPC-Cmd
yum -y install perl-Pod-Html

https://github.com/shellinabox/shellinabox/issues/485

build

git clone https://github.com/shellinabox/shellinabox.git
cd shellinabox/
autoreconf -i
./configure LIBS="-lssl -lcrypto" --prefix=/opt/shellinabox
make && make install

in use: /opt/shellinabox/bin/shellinaboxd --no-beep --disable-peer-check -p 4201 --user-css "Normal:+/root/shellinabox/shellinabox/black-on-white.css" -t -s /:LOGIN

/opt/shellinabox/bin/shellinaboxd --no-beep --disable-peer-check -p 4201 --user-css "Normal:+/root/shellinabox/shellinabox/white-on-black.css" -t -s /:LOGIN

all

pushd /root
yum install -y git openssl-devel pam-devel zlib-devel autoconf automake libtool make
yum install -y perl-IPC-Cmd
yum -y install perl-Pod-Html
git clone https://github.com/shellinabox/shellinabox.git
pushd shellinabox/
sed -i 's/Paste into this box.*/Paste into this box:","");\n  clipboard = clipboard.replaceAll("\\r", "");/g'  shellinabox/vt100.jspp
autoreconf -i
./configure LIBS="-lssl -lcrypto" --prefix=/opt/shellinabox
make && make install
popd

auto login

#https://github.com/shellinabox/shellinabox/issues/521
#https://github.com/shellinabox/shellinabox/issues/264
echo "shellinabox" > /etc/pam.d/shellinabox.allow
cat > /etc/pam.d/shellinabox <<EOF
"#%PAM-1.0
auth required pam_listfile.so item=user sense=allow file=/etc/pam.d/shellinabox.allow onerr=fail
auth include system-auth
account include system-auth
session include system-auth
password include system-auth"
EOF

screen -dmS shell bash -c '/opt/shellinabox/bin/shellinaboxd --no-beep --disable-peer-check -p 4201 --user-css "Normal:+/root/shellinabox/shellinabox/white-on-black.css" -t -s /:root:root:/root:bash'

/opt/shellinabox/bin/shellinaboxd --no-beep --disable-peer-check -p 4201 --user-css "Normal:+/etc/shellinabox/options-enabled/00_White-On-Black.css;Colors:+/etc/shellinabox/options-enabled/01+Color-Terminal.css" -t -s /:LOGIN