HEX
Server: Apache
System: Linux 3b2f6704f3ac 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017 x86_64
User: (2182)
PHP: 7.4.33
Disabled: proc_open, passthru, escapeshellcmd, exec, shell_exec, system, ini_alter, dl, popen, php_check_syntax, show_source, highlight_file, symlink, link, openlog, apache_child_terminate
Upload Files
File: //usr/local/bin/enable_ssh.sh
#!/bin/bash

if [ ! -z $user ]; then
    #Start ssh server
    /usr/bin/getent group $(printenv guid) > /dev/null
    if [ $? -eq 0 ]; then
       [ -z "$_DEBUG" ] || echo "The group already exists"
    else
       /usr/sbin/groupadd -g $(printenv guid) ssh-user
    fi
    /usr/bin/getent passwd $(printenv uid) > /dev/null
    if [ $? -eq 0 ]; then
       [ -z "$_DEBUG" ] || echo "The user already exists"
    else
       /usr/sbin/useradd ssh-user -s /bin/bash -u $(printenv uid) -g $(printenv guid) -d /home/defaultwebsite
    fi
    /usr/sbin/sshd -D &

    pair="$(printenv uid):$(printenv guid)"
    if grep -q $pair /etc/passwd; then
        [ -z "$_DEBUG" ] || echo "SSH user setupped OK!"
        [ -z "$_DEBUG" ] || stat /etc/passwd
        [ -z "$_DEBUG" ] || cat /etc/passwd
    else
      echo "Failed to setup SSH user creation."
    fi
else
    [ -z "$_DEBUG" ] || echo "[INFO] SSH is not setupped."
fi