-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtunnels
executable file
·44 lines (37 loc) · 1.28 KB
/
tunnels
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
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/sh
case "$1" in
stop)
# Close all tunnels.
pkill -f "ssh -N -f -L"
;;
start)
# Jupyter
ssh -N -f -L localhost:8891:localhost:8888 cdk1
ssh -N -f -L localhost:8892:localhost:8888 cdk2
ssh -N -f -L localhost:8893:localhost:8888 cdk3
ssh -N -f -L localhost:8894:localhost:8888 cdk4
ssh -N -f -L localhost:8895:localhost:8888 gdk0 # gdk0a
ssh -N -f -L localhost:8896:localhost:8889 gdk0 # gdk0b
ssh -N -f -L localhost:8897:localhost:8890 gdk0 # gdk0c
ssh -N -f -L localhost:8898:localhost:8891 gdk0 # gdk0d
# TensorBoard
ssh -N -f -L localhost:6001:localhost:6006 cdk1
ssh -N -f -L localhost:6002:localhost:6006 cdk2
ssh -N -f -L localhost:6003:localhost:6006 cdk3
ssh -N -f -L localhost:6004:localhost:6006 cdk4
ssh -N -f -L localhost:6007:localhost:6006 gdk0 # gdk0a
ssh -N -f -L localhost:6008:localhost:6007 gdk0 # gdk0b
ssh -N -f -L localhost:6009:localhost:6008 gdk0 # gdk0c
ssh -N -f -L localhost:6010:localhost:6009 gdk0 # gdk0d
# Syncthing
ssh -N -f -L localhost:8385:localhost:8384 cdk1
ssh -N -f -L localhost:8386:localhost:8384 cdk2
ssh -N -f -L localhost:8387:localhost:8384 cdk3
ssh -N -f -L localhost:8388:localhost:8384 cdk4
ssh -N -f -L localhost:8389:localhost:8384 gdk0
;;
restart)
"$0" stop
"$0" start
;;
esac