-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
34 lines (29 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#Author:sidious
FROM debian:unstable-slim
RUN apt update && apt install openssh-server tor sudo curl vim --yes
RUN useradd -m -s /bin/bash sidious
RUN usermod -append --groups sudo sidious
RUN echo "sidious:changeme" | chpasswd
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "HiddenServiceDir /var/lib/tor/onion-ssh/\n\
HiddenServicePort 22 127.0.0.1:22\n"\
>> /etc/tor/torrc
RUN mv /etc/ssh/sshd_config /etc/ssh/backup.sshd_config
RUN echo "Protocol 2\n\
IgnoreRhosts yes\n\
HostbasedAuthentication no\n\
PermitRootLogin no\n\
PermitEmptyPasswords no\n\
X11Forwarding no\n\
MaxAuthTries 5\n\
ClientAliveInterval 900\n\
ClientAliveCountMax 0\n\
Subsystem sftp internal-sftp\n\
UsePAM yes\n\
HostKey /etc/ssh/ssh_host_ed25519_key\n\
HostKey /etc/ssh/ssh_host_rsa_key\n\
KexAlgorithms [email protected]\n\
>> etc/ssh/sshd_config
ENTRYPOINT service ssh start && service tor start && /bin/bash