File tree 4 files changed +15
-2
lines changed
4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,12 @@ $ curl 127.0.0.1:21112; curl 127.0.0.1:21113
149
149
:)
150
150
```
151
151
152
+ ## How to check ssh server logs
153
+
154
+ ``` sh
155
+ $ docker exec mole_ssh tail -f /var/log/messages
156
+ ```
157
+
152
158
## Packet Analisys
153
159
154
160
If you need to analyze the traffic going through the tunnel, the test
Original file line number Diff line number Diff line change @@ -12,11 +12,12 @@ COPY motd /etc/motd
12
12
RUN /usr/bin/ssh-keygen -A
13
13
14
14
RUN addgroup -S mole && adduser -S mole -G mole -D -s /bin/ash && usermod -p 'this-is-not-a-valid-hash' mole
15
- RUN mkdir -p /home/mole/.ssh && chown mole:mole /home/mole/.ssh
15
+ RUN mkdir -p /home/mole/.ssh && chown mole:mole /home/mole/.ssh && chmod 0700 /home/mole/.ssh
16
16
17
17
RUN chgrp mole /usr/sbin/tcpdump && chmod 750 /usr/sbin/tcpdump && setcap cap_net_raw+ep /usr/sbin/tcpdump
18
18
19
19
COPY authorized_keys /home/mole/.ssh/
20
+ RUN chown mole:mole /home/mole/.ssh/authorized_keys && chmod 0600 /home/mole/.ssh/authorized_keys
20
21
21
22
COPY supervisord.conf /etc/supervisord.conf
22
23
RUN mkdir -p /var/log/supervisor
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ PubkeyAuthentication yes
5
5
PasswordAuthentication no
6
6
AuthorizedKeysFile .ssh/authorized_keys
7
7
SyslogFacility AUTH
8
- LogLevel INFO
8
+ LogLevel DEBUG1
9
9
AllowAgentForwarding yes
10
10
ClientAliveInterval 3
11
11
ClientAliveCountMax 0
Original file line number Diff line number Diff line change @@ -22,3 +22,9 @@ serverurl=unix:///run/supervisord.sock ; use a unix:// URL for a unix s
22
22
[program:sshd]
23
23
command=/usr/sbin/sshd -D
24
24
redirect_stderr=true
25
+ autorestart=true
26
+
27
+ [program:syslogd]
28
+ command=/sbin/syslogd
29
+ redirect_stderr=true
30
+ autorestart=true
You can’t perform that action at this time.
0 commit comments