Newer
Older
sudo apt update
sudo apt install --yes openssl shellinabox
sudo sed -i 's|SHELLINABOX_PORT=4200|SHELLINABOX_PORT=443|' /etc/default/shellinabox
sudo iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -t filter -A OUTPUT -p tcp --dport 443 -j ACCEPT
sudo iptables-save
sudo systemctl restart shellinabox
sudo useradd -m -s /bin/bash -g users -G adm,dialout,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev etudiant
sudo cp /etc/skel/.* /home/etudiant/
USER_PASSWORD=$( openssl rand -hex 12 )
sudo passwd etudiant << EOF
${USER_PASSWORD}
${USER_PASSWORD}
EOF
HTTP_ENDP="https://$HOST_NAME"
ss-set url.service "${HTTP_ENDP}"
ss-set ss:url.service "[HTTPS]$HTTP_ENDP,[LOGIN]$etudiant,[PASSWORD]$USER_PASSWORD"