Initial commit
Signed-off-by: Alexander <hi@odyssey346.dev>
This commit is contained in:
commit
be95f39140
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -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 /
|
13
LICENSE
Normal file
13
LICENSE
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2023 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
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.
|
38
README.md
Normal file
38
README.md
Normal file
@ -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@<your home network IP>
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then configure your browser to run the SOCKS5 proxy on localhost:1080. Have fun!
|
5
entrypoint.sh
Normal file
5
entrypoint.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
ssh-keygen -A >> /dev/null
|
||||||
|
cat /etc/motd
|
||||||
|
echo ""
|
||||||
|
exec /usr/sbin/sshd -D -e "$@" >> /dev/null
|
7
motd
Normal file
7
motd
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user