igor04091968 commited on
Commit
5d430fc
·
verified ·
1 Parent(s): 0111e13

Create Entrypoint

Browse files
Files changed (1) hide show
  1. entrypoint.sh +19 -0
entrypoint.sh ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ # 1. Start the container's SSH server
4
+ /usr/sbin/sshd
5
+
6
+ # 2. Start stunnel client
7
+ stunnel /etc/stunnel/stunnel.conf
8
+
9
+ # 3. Execute the reverse SSH tunnel command
10
+ sleep 2
11
+
12
+ ssh -N -g \
13
+ -o "StrictHostKeyChecking=no" \
14
+ -o "UserKnownHostsFile=/dev/null" \
15
+ -R 0.0.0.0:1080 \
16
+ -R 0.0.0.0:2222:localhost:22 \
17
+ -R 0.0.0.0:110:localhost:110 \
18
+ -p 2222 root@127.0.0.1 \
19
+ -i /root/.ssh/id_rsa_vds1