commit be95f391408944cf6aec6c710518b6a631a9d8f2 Author: Alexander Date: Tue Feb 7 15:14:14 2023 +0100 Initial commit Signed-off-by: Alexander diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e5582e3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:latest + +RUN apk add openssh + +RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config + +RUN adduser -h /home/user -s /bin/sh -D user + +# sounds insecure, which it is, but you're in a container and you're supposed to change it +RUN echo 'user:password' | chpasswd + +COPY motd / +RUN rm /etc/motd && cat /motd >> /etc/motd + +ENTRYPOINT ["/entrypoint.sh"] +EXPOSE 22 +COPY entrypoint.sh / \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f1fb5cb --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2023 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md new file mode 100644 index 0000000..96db942 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# FalseSSH + +FalseSSH is a Dockerized SSH server intended for running a SOCKS5 proxy based on SSH. + +## Usage + +Create a container with the following command: + +```bash +docker build -t falsessh . +docker run -d --name falsessh -p 22:2269 +``` + +Try SSHing into the container. +```bash + ssh user@localhost -p 2269 +``` + +Change the password immediately. +```bash + passwd +``` + +Port forward the SOCKS5 proxy to your local machine. +```bash + ssh -D 1080 -p 2269 user@localhost +``` + +Then you can configure your browser to use the SOCKS5 proxy on localhost:1080. + +You can also port-forward the SSH server from your home network to access the proxy remotely, like if you want to bypass school restrictions. + +To connect if you're doing above, run this: +```bash + ssh -D 1080 -p 2269 user@ +``` + +You can then configure your browser to run the SOCKS5 proxy on localhost:1080. Have fun! \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..c768b77 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh +ssh-keygen -A >> /dev/null +cat /etc/motd +echo "" +exec /usr/sbin/sshd -D -e "$@" >> /dev/null \ No newline at end of file diff --git a/motd b/motd new file mode 100644 index 0000000..d610a7d --- /dev/null +++ b/motd @@ -0,0 +1,7 @@ +=== +FalseSSH +=== + +FalseSSH is a Dockerized SSH server intended for running a SOCKS5 proxy based on SSH. +If you haven't changed your password already, DO IT NOW! If you're unable to change it for some reason, recreate the container. +More info at: git.willy.club/Alex/FalseSSH \ No newline at end of file