HEX
Server: nginx/1.18.0
System: Linux proba.drlaca.appboxes.co 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64
User: appbox (1000)
PHP: 7.4.3-4ubuntu2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //sbin/enable_insecure_key
#!/bin/bash
set -e

AUTHORIZED_KEYS=/root/.ssh/authorized_keys

if [[ -e "$AUTHORIZED_KEYS" ]] && grep -q baseimage-docker-insecure-key "$AUTHORIZED_KEYS"; then
	echo "Insecure key has already been added to $AUTHORIZED_KEYS."
else
	DIR=`dirname "$AUTHORIZED_KEYS"`
	echo "Creating directory $DIR..."
	mkdir -p "$DIR"
	chmod 700 "$DIR"
	chown root:root "$DIR"
	echo "Editing $AUTHORIZED_KEYS..."
	cat /etc/insecure_key.pub >> "$AUTHORIZED_KEYS"
	echo "Success: insecure key has been added to $AUTHORIZED_KEYS"
	cat <<-EOF

		+------------------------------------------------------------------------------+
		| Insecure SSH key installed                                                   |
		|                                                                              |
		| DO NOT expose port 22 on the Internet unless you know what you are doing!    |
		|                                                                              |
		| Use the private key below to connect with user root                         |
		+------------------------------------------------------------------------------+

	EOF
	cat /etc/insecure_key
	echo -e "\n\n"
fi