| #!/bin/bash |
|
|
| |
| export DEBIAN_FRONTEND=noninteractive |
|
|
| |
| apt update |
| apt install -y openssh-server wget nano ca-certificates curl |
|
|
| |
| echo "root:123456" | chpasswd |
|
|
| |
| sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config |
| sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config |
|
|
| |
| mkdir -p /var/run/sshd |
|
|
| |
| pkill sshd 2>/dev/null || true |
|
|
| |
| /usr/sbin/sshd |
| echo "[*] SSH server jalan di container" |
|
|
| |
| if ! [ -f "./pinggy" ]; then |
| wget -O pinggy https://pinggy.io/cli/download/linux/x86_64 || echo "[!] Pinggy URL mungkin tidak valid" |
| chmod +x pinggy |
| fi |
|
|
| |
| LOG_FILE=/tmp/pinggy.log |
| rm -f $LOG_FILE |
|
|
| echo "[*] Menjalankan tunnel Pinggy..." |
| while true; do |
| ./pinggy tcp 22 2>&1 | tee -a $ |