| FROM ubuntu:22.04 |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| RUN apt-get update && apt-get install -y \ |
| openssh-server curl wget unzip python3 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN mkdir /var/run/sshd |
| RUN echo "root:123456" | chpasswd |
| RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config |
| RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config |
|
|
| |
| RUN curl -L https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.zip -o ngrok.zip \ |
| && unzip ngrok.zip \ |
| && mv ngrok /usr/local/bin/ngrok |
|
|
| |
| RUN ngrok config add-authtoken 3BUzxPBLKCbyYCQluIjmxYZCNKP_81Vwt3PwtJQMuegkJCUe |
|
|
| EXPOSE 7860 |
|
|
| CMD bash -c "\ |
| echo 'SSH RUNNING' && \ |
| /usr/sbin/sshd & \ |
| python3 -m http.server 7860 & \ |
| sleep 3 && ngrok tcp 22" |