diff --git a/README.md b/README.md index 190e8fa..8914043 100644 --- a/README.md +++ b/README.md @@ -73,13 +73,16 @@ For more information, see the [`ssh_config(5)`](https://linux.die.net/man/5/ssh_ | ----------------------------- | ------------------------------ | ------------- | | `SSH_HOSTNAME` _required_ | Hostname | - | | `SSH_PORT` | Port | `22` | +| `SSH_REMOTE_FORWARD` | RemoteForward | - | +| `SSH_LOCAL_FORWARD` | LocalForward | - | | `SSH_SERVER_ALIVE_INTERVAL` | ServerAliveInterval | `10` | | `SSH_SERVER_ALIVE_COUNT_MAX` | ServerAliveCountMax | `3` | | `SSH_EXIT_ON_FORWARD_FAILURE` | ExitOnForwardFailure | `yes` | | `SSH_SESSION_TYPE` | SessionType | `none` | -You can pass arguments to `ssh` command using the `SSH_CLI_OPTIONS` environment variable. -You can define the SSH port forwarding using this variable (`-R` and `-L` options). +You can define the SSH port forwarding using `SSH_REMOTE_FORWARD` and `SSH_LOCAL_FORWARD`. +Each of these variables can have multiple port forwarding rules separated by semicolons (`;`). + Please note that the server image only supports remote port forwarding by default for security reasons. If you want to use local port forwarding, @@ -147,7 +150,7 @@ docker run --name tunnel-client --rm -it --init --add-host=host.docker.internal: -e CLIENT_ED25519_PRIVATE_KEY_BASE64="$(cat key2 | base64 -w 0)" \ -e SSH_HOSTNAME="host.docker.internal" \ -e SSH_PORT="2222" \ - -e SSH_CLI_OPTIONS="-R 0.0.0.0:4444:127.0.0.1:6666" \ + -e SSH_REMOTE_FORWARD="0.0.0.0:4444 127.0.0.1:6666" \ ghcr.io/querateam/docker-ssh-tunnel/client ``` @@ -194,7 +197,7 @@ services: SERVER_ED25519_PUBLIC_KEY: ... value of key1.pub ... SSH_HOSTNAME: host.docker.internal SSH_PORT: 2222 - SSH_CLI_OPTIONS: -R 0.0.0.0:4444:127.0.0.1:6666 + SSH_REMOTE_FORWARD: 0.0.0.0:4444 127.0.0.1:6666 extra_hosts: - host.docker.internal:host-gateway diff --git a/client/entrypoint.sh b/client/entrypoint.sh index 92c5d89..1fd82bd 100644 --- a/client/entrypoint.sh +++ b/client/entrypoint.sh @@ -10,6 +10,10 @@ if [ -z "${SSH_HOSTNAME}" ]; then echo "SSH_HOSTNAME is not set. Exiting..." exit 1 fi +if [ -z "${SSH_REMOTE_FORWARD}" ] && [ -z "${SSH_LOCAL_FORWARD}" ]; then + echo "You should set at least one of SSH_REMOTE_FORWARD and SSH_LOCAL_FORWARD. Exiting..." + exit 1 +fi # We don't want to depend on the existence of a real user and a home directory, # so we can run the container as any non-root user with any uid and gid. @@ -65,6 +69,16 @@ ServerAliveCountMax ${SSH_SERVER_ALIVE_COUNT_MAX:-3} ExitOnForwardFailure ${SSH_EXIT_ON_FORWARD_FAILURE:-yes} SessionType ${SSH_SESSION_TYPE:-none} " >"${HOME}/.ssh/config" +if [ -n "${SSH_REMOTE_FORWARD}" ]; then + echo "${SSH_REMOTE_FORWARD}" | tr ';' '\n' | while IFS= read -r remote_forward; do + echo "RemoteForward ${remote_forward}" >>"${HOME}/.ssh/config" + done +fi +if [ -n "${SSH_LOCAL_FORWARD}" ]; then + echo "${SSH_LOCAL_FORWARD}" | tr ';' '\n' | while IFS= read -r local_forward; do + echo "LocalForward ${local_forward}" >>"${HOME}/.ssh/config" + done +fi ################################ # autossh options # @@ -76,4 +90,4 @@ export AUTOSSH_POLL="${AUTOSSH_POLL:-30}" ################################ # start the SSH tunnel # ################################ -exec /usr/bin/autossh -T ${SSH_CLI_OPTIONS} "${SSH_HOSTNAME}" +exec /usr/bin/autossh -T "${SSH_HOSTNAME}" diff --git a/docs/ssh-port-forwarding.excalidraw b/docs/ssh-port-forwarding.excalidraw index 1af5ed9..290e02d 100644 --- a/docs/ssh-port-forwarding.excalidraw +++ b/docs/ssh-port-forwarding.excalidraw @@ -4,32 +4,32 @@ "source": "https://excalidraw.com", "elements": [ { - "id": "wEi0TWOVLGovMUY7bH21N", "type": "rectangle", - "x": 376.356441210575, - "y": 336.8110490454802, - "width": 548.569751789425, - "height": 53.09165552462292, - "angle": 0, - "strokeColor": "#ced4da", - "backgroundColor": "#e9ecef", + "version": 467, + "versionNonce": 1392360359, + "index": "Zy", + "isDeleted": false, + "id": "wEi0TWOVLGovMUY7bH21N", "fillStyle": "solid", "strokeWidth": 1, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 240.56203900000003, + "y": 336.2764254172541, + "strokeColor": "#ced4da", + "backgroundColor": "#e9ecef", + "width": 684.3641540000001, + "height": 53.091655524622894, + "seed": 2017729495, "groupIds": [], "frameId": null, - "index": "Zy", "roundness": { "type": 3 }, - "seed": 2017729495, - "version": 230, - "versionNonce": 77585497, - "isDeleted": false, - "boundElements": null, - "updated": 1723366516708, + "boundElements": [], + "updated": 1723586415398, "link": null, "locked": false }, @@ -64,35 +64,35 @@ "locked": false }, { - "id": "csFzVy4104f_1VugVRvNI", "type": "text", - "x": 575.9939756409645, - "y": 200.739492, - "width": 350.00146484375, - "height": 32.199999999999996, - "angle": 0, - "strokeColor": "#868e96", - "backgroundColor": "transparent", + "version": 1231, + "versionNonce": 212120951, + "index": "aG", + "isDeleted": false, + "id": "csFzVy4104f_1VugVRvNI", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 575.9939756409645, + "y": 200.739492, + "strokeColor": "#868e96", + "backgroundColor": "transparent", + "width": 350.00146484375, + "height": 32.199999999999996, + "seed": 446909305, "groupIds": [], "frameId": null, - "index": "aG", "roundness": null, - "seed": 446909305, - "version": 1231, - "versionNonce": 212120951, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1723366720325, "link": null, "locked": false, - "text": "Remote Port Forwarding (-R)", "fontSize": 28, "fontFamily": 7, + "text": "Remote Port Forwarding (-R)", "textAlign": "center", "verticalAlign": "top", "containerId": null, @@ -101,102 +101,65 @@ "lineHeight": 1.15 }, { - "id": "xM9je0Ay4U7Cq8_n3ZHHn", "type": "rectangle", - "x": 443.97514022829057, - "y": 256.50000007743944, - "width": 216.55902815756417, - "height": 69.25766147671965, - "angle": 0, - "strokeColor": "#4dabf7", - "backgroundColor": "#e7f5ff", + "version": 1200, + "versionNonce": 1128547559, + "index": "aI", + "isDeleted": false, + "id": "xM9je0Ay4U7Cq8_n3ZHHn", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 467.97514022829057, + "y": 256.50000007743944, + "strokeColor": "#4dabf7", + "backgroundColor": "#e7f5ff", + "width": 216.55902815756417, + "height": 69.25766147671965, + "seed": 473001209, "groupIds": [], "frameId": null, - "index": "aI", "roundness": { "type": 3 }, - "seed": 473001209, - "version": 1172, - "versionNonce": 326004375, - "isDeleted": false, "boundElements": [], - "updated": 1723365778642, + "updated": 1723586365526, "link": null, "locked": false }, { - "id": "XcrDL_xiuL6_2kMlxCc5H", "type": "text", - "x": 680.0400593965953, - "y": 335.65204899597234, - "width": 9, - "height": 48.6, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", + "version": 483, + "versionNonce": 744034311, + "index": "aL", + "isDeleted": false, + "id": "BaXBINFkg9yK-RDIoYYwp", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, - "groupIds": [], - "frameId": null, - "index": "aK", - "roundness": null, - "seed": 1259834393, - "version": 492, - "versionNonce": 1693772089, - "isDeleted": false, - "boundElements": null, - "updated": 1723366516708, - "link": null, - "locked": false, - "text": ":", - "fontSize": 36, - "fontFamily": 6, - "textAlign": "left", - "verticalAlign": "top", - "containerId": null, - "originalText": ":", - "autoResize": true, - "lineHeight": 1.35 - }, - { - "id": "BaXBINFkg9yK-RDIoYYwp", - "type": "text", - "x": 449.534442827733, - "y": 341.1252423557536, - "width": 210.99972534179688, - "height": 50, "angle": 0, + "x": 473.534442827733, + "y": 341.1252423557536, "strokeColor": "#1e1e1e", "backgroundColor": "transparent", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, + "width": 210.99972534179688, + "height": 50, + "seed": 1475625433, "groupIds": [], "frameId": null, - "index": "aL", "roundness": null, - "seed": 1475625433, - "version": 455, - "versionNonce": 349526553, - "isDeleted": false, - "boundElements": null, - "updated": 1723366516708, + "boundElements": [], + "updated": 1723586365526, "link": null, "locked": false, - "text": "[bind_address:]port\nremote_socket", "fontSize": 20, "fontFamily": 8, + "text": "[bind_address:]port\nremote_socket", "textAlign": "right", "verticalAlign": "top", "containerId": null, @@ -242,40 +205,40 @@ "lineHeight": 1.25 }, { - "id": "pS86dOukM9ON6F9o3_MGf", "type": "text", - "x": 497.6037443031206, - "y": 257.032367112436, - "width": 106.05601501464844, - "height": 45, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", + "version": 535, + "versionNonce": 719812391, + "index": "aN", + "isDeleted": false, + "id": "pS86dOukM9ON6F9o3_MGf", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 521.6037443031206, + "y": 257.032367112436, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 106.05601501464844, + "height": 45, + "seed": 1794692151, "groupIds": [], "frameId": null, - "index": "aN", "roundness": null, - "seed": 1794692151, - "version": 507, - "versionNonce": 762226713, - "isDeleted": false, "boundElements": [ { "id": "nqVLRHm9FPN6ud1JqOQBK", "type": "arrow" } ], - "updated": 1723366366223, + "updated": 1723586365526, "link": null, "locked": false, - "text": "Listen", "fontSize": 36, "fontFamily": 5, + "text": "Listen", "textAlign": "left", "verticalAlign": "top", "containerId": null, @@ -284,28 +247,28 @@ "lineHeight": 1.25 }, { - "id": "xYE1GE3krgodOWOEPrKzD", "type": "text", - "x": 773.8063598455855, - "y": 257.69999955984656, - "width": 84.49201965332031, - "height": 45, - "angle": 0, - "strokeColor": "#6741d9", - "backgroundColor": "transparent", + "version": 853, + "versionNonce": 898935385, + "index": "aO", + "isDeleted": false, + "id": "xYE1GE3krgodOWOEPrKzD", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 773.8063598455855, + "y": 257.69999955984656, + "strokeColor": "#6741d9", + "backgroundColor": "transparent", + "width": 84.49201965332031, + "height": 45, + "seed": 864222551, "groupIds": [], "frameId": null, - "index": "aO", "roundness": null, - "seed": 864222551, - "version": 853, - "versionNonce": 898935385, - "isDeleted": false, "boundElements": [ { "id": "nqVLRHm9FPN6ud1JqOQBK", @@ -315,9 +278,9 @@ "updated": 1723366365906, "link": null, "locked": false, - "text": "Open", "fontSize": 36, "fontFamily": 5, + "text": "Open", "textAlign": "left", "verticalAlign": "top", "containerId": null, @@ -326,35 +289,35 @@ "lineHeight": 1.25 }, { - "id": "pQTJDMY0dmyFHAMOrXz0J", "type": "text", - "x": 456.6037936154879, - "y": 236.4962063845121, - "width": 56.424102783203125, - "height": 21.6, - "angle": 0, - "strokeColor": "#4dabf7", - "backgroundColor": "#e7f5ff", + "version": 602, + "versionNonce": 1083382119, + "index": "aR", + "isDeleted": false, + "id": "pQTJDMY0dmyFHAMOrXz0J", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 480.6037936154879, + "y": 236.4962063845121, + "strokeColor": "#4dabf7", + "backgroundColor": "#e7f5ff", + "width": 56.424102783203125, + "height": 21.6, + "seed": 2049348791, "groupIds": [], "frameId": null, - "index": "aR", "roundness": null, - "seed": 2049348791, - "version": 574, - "versionNonce": 299845497, - "isDeleted": false, - "boundElements": null, - "updated": 1723366543788, + "boundElements": [], + "updated": 1723586365526, "link": null, "locked": false, - "text": "Remote", "fontSize": 16, "fontFamily": 6, + "text": "Remote", "textAlign": "left", "verticalAlign": "top", "containerId": null, @@ -400,43 +363,32 @@ "lineHeight": 1.35 }, { - "id": "nqVLRHm9FPN6ud1JqOQBK", "type": "arrow", - "x": 611.8817523031206, - "y": 280.5997686540473, - "width": 151.9206175424648, - "height": 0.40131443567537417, - "angle": 0, - "strokeColor": "#868e96", - "backgroundColor": "#a5d8ff", + "version": 1124, + "versionNonce": 358349383, + "index": "aY", + "isDeleted": false, + "id": "nqVLRHm9FPN6ud1JqOQBK", "fillStyle": "cross-hatch", "strokeWidth": 4, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 635.8817523031206, + "y": 280.6207713227126, + "strokeColor": "#868e96", + "backgroundColor": "#a5d8ff", + "width": 127.92061754246481, + "height": 0.3803117670100846, + "seed": 782489815, "groupIds": [], "frameId": null, - "index": "aY", "roundness": null, - "seed": 782489815, - "version": 1096, - "versionNonce": 608322039, - "isDeleted": false, - "boundElements": null, - "updated": 1723366366223, + "boundElements": [], + "updated": 1723586365526, "link": null, "locked": false, - "points": [ - [ - 0, - 0 - ], - [ - 151.9206175424648, - 0.40131443567537417 - ] - ], - "lastCommittedPoint": null, "startBinding": { "elementId": "pS86dOukM9ON6F9o3_MGf", "focus": 0.03999999999999899, @@ -449,40 +401,51 @@ "gap": 10.003990000000044, "fixedPoint": null }, + "lastCommittedPoint": null, "startArrowhead": null, "endArrowhead": "triangle", + "points": [ + [ + 0, + 0 + ], + [ + 127.92061754246481, + 0.3803117670100846 + ] + ], "elbowed": false }, { - "id": "wjcm9xuPPseBMKnZA1xXi", "type": "text", - "x": 460.32613471531374, - "y": 300.2755437132292, - "width": 182.40037536621094, - "height": 20, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#f8f1ee", + "version": 208, + "versionNonce": 836326535, + "index": "al", + "isDeleted": false, + "id": "wjcm9xuPPseBMKnZA1xXi", "fillStyle": "cross-hatch", "strokeWidth": 4, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 484.32613471531374, + "y": 300.2755437132292, + "strokeColor": "#2f9e44", + "backgroundColor": "#f8f1ee", + "width": 182.40037536621094, + "height": 20, + "seed": 1513488889, "groupIds": [], "frameId": null, - "index": "al", "roundness": null, - "seed": 1513488889, - "version": 180, - "versionNonce": 2040223735, - "isDeleted": false, - "boundElements": null, - "updated": 1723366407848, + "boundElements": [], + "updated": 1723586365526, "link": null, "locked": false, - "text": "to new port or socket", "fontSize": 16, "fontFamily": 8, + "text": "to new port or socket", "textAlign": "center", "verticalAlign": "top", "containerId": null, @@ -528,46 +491,46 @@ "lineHeight": 1.25 }, { - "id": "pN2935j-Sgp_95ZGr6iV9", "type": "text", - "x": 387.1060076567337, - "y": 343.9706852724283, - "width": 33.40007019042969, - "height": 35, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#f8f1ee", + "version": 231, + "versionNonce": 1366198663, + "index": "b00", + "isDeleted": false, + "id": "pN2935j-Sgp_95ZGr6iV9", "fillStyle": "cross-hatch", "strokeWidth": 4, "strokeStyle": "solid", "roughness": 1, "opacity": 100, + "angle": 0, + "x": 254.170611933781, + "y": 345.9706852724283, + "strokeColor": "#1e1e1e", + "backgroundColor": "#f8f1ee", + "width": 200.80084228515625, + "height": 35, + "seed": 665053271, "groupIds": [], "frameId": null, - "index": "b00", "roundness": null, - "seed": 665053271, - "version": 149, - "versionNonce": 2090231769, - "isDeleted": false, - "boundElements": null, - "updated": 1723366516708, + "boundElements": [], + "updated": 1723586408970, "link": null, "locked": false, - "text": "-R", "fontSize": 28, "fontFamily": 8, + "text": "RemoteForward", "textAlign": "right", "verticalAlign": "top", "containerId": null, - "originalText": "-R", + "originalText": "RemoteForward", "autoResize": true, "lineHeight": 1.25 }, { "type": "rectangle", - "version": 286, - "versionNonce": 527339321, + "version": 390, + "versionNonce": 27672105, "index": "b0G", "isDeleted": false, "id": "eUYk224Ewd0TsFrEl7spp", @@ -577,12 +540,12 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 376.3564409855237, + "x": 240.56203934760333, "y": 554.6220405711047, "strokeColor": "#ced4da", "backgroundColor": "#e9ecef", - "width": 548.569751789425, - "height": 53.09165552462292, + "width": 684.3641534273455, + "height": 53.091655524622865, "seed": 211276407, "groupIds": [], "frameId": null, @@ -590,7 +553,7 @@ "type": 3 }, "boundElements": [], - "updated": 1723366522089, + "updated": 1723586412750, "link": null, "locked": false }, @@ -663,8 +626,8 @@ }, { "type": "rectangle", - "version": 1238, - "versionNonce": 1619942073, + "version": 1266, + "versionNonce": 1509236423, "index": "b0J", "isDeleted": false, "id": "pVwlTaPymuugVwQ4j00TA", @@ -674,7 +637,7 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 443.9751400032393, + "x": 467.9751400032393, "y": 474.3109916030638, "strokeColor": "#d2bab0", "backgroundColor": "#f8f1ee", @@ -687,51 +650,14 @@ "type": 3 }, "boundElements": [], - "updated": 1723366122142, + "updated": 1723586365526, "link": null, "locked": false }, { "type": "text", - "version": 552, - "versionNonce": 1563050009, - "index": "b0K", - "isDeleted": false, - "id": "TVOr1XRvVOsNKQSHYEN1R", - "fillStyle": "solid", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 1, - "opacity": 100, - "angle": 0, - "x": 680.040059171544, - "y": 553.4630405215967, - "strokeColor": "#1e1e1e", - "backgroundColor": "transparent", - "width": 9, - "height": 48.6, - "seed": 1814781687, - "groupIds": [], - "frameId": null, - "roundness": null, - "boundElements": [], - "updated": 1723366522089, - "link": null, - "locked": false, - "fontSize": 36, - "fontFamily": 6, - "text": ":", - "textAlign": "left", - "verticalAlign": "top", - "containerId": null, - "originalText": ":", - "autoResize": true, - "lineHeight": 1.35 - }, - { - "type": "text", - "version": 515, - "versionNonce": 1308415225, + "version": 543, + "versionNonce": 1335078375, "index": "b0L", "isDeleted": false, "id": "Vkq2qIDvUT5T5DQJ2tA1s", @@ -741,7 +667,7 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 449.53444260268174, + "x": 473.53444260268174, "y": 558.936233881378, "strokeColor": "#1e1e1e", "backgroundColor": "transparent", @@ -752,7 +678,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1723366522089, + "updated": 1723586365526, "link": null, "locked": false, "fontSize": 20, @@ -804,8 +730,8 @@ }, { "type": "text", - "version": 568, - "versionNonce": 101968727, + "version": 599, + "versionNonce": 707421833, "index": "b0N", "isDeleted": false, "id": "_bejbInpe841KozyRNFWp", @@ -815,7 +741,7 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 497.6037440780693, + "x": 521.6037440780693, "y": 474.8433586380604, "strokeColor": "#2f9e44", "backgroundColor": "transparent", @@ -825,8 +751,13 @@ "groupIds": [], "frameId": null, "roundness": null, - "boundElements": [], - "updated": 1723366007129, + "boundElements": [ + { + "id": "2lK8f8So6Rw9JlDFOkLwg", + "type": "arrow" + } + ], + "updated": 1723586688982, "link": null, "locked": false, "fontSize": 36, @@ -841,8 +772,8 @@ }, { "type": "text", - "version": 911, - "versionNonce": 1162504311, + "version": 914, + "versionNonce": 997140265, "index": "b0O", "isDeleted": false, "id": "axmsPDPSvj5kjY9Dvz3XL", @@ -862,8 +793,13 @@ "groupIds": [], "frameId": null, "roundness": null, - "boundElements": [], - "updated": 1723366007129, + "boundElements": [ + { + "id": "2lK8f8So6Rw9JlDFOkLwg", + "type": "arrow" + } + ], + "updated": 1723586688983, "link": null, "locked": false, "fontSize": 36, @@ -878,8 +814,8 @@ }, { "type": "text", - "version": 643, - "versionNonce": 874555511, + "version": 671, + "versionNonce": 389062695, "index": "b0P", "isDeleted": false, "id": "mbK6k0xNcblcWFRHo2S-P", @@ -889,7 +825,7 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 456.60379339043664, + "x": 480.60379339043664, "y": 453.37636789739827, "strokeColor": "#a18072", "backgroundColor": "#e7f5ff", @@ -900,7 +836,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1723366557888, + "updated": 1723586365526, "link": null, "locked": false, "fontSize": 16, @@ -952,8 +888,8 @@ }, { "type": "arrow", - "version": 1312, - "versionNonce": 103971353, + "version": 1406, + "versionNonce": 791829001, "index": "b0R", "isDeleted": false, "id": "2lK8f8So6Rw9JlDFOkLwg", @@ -963,22 +899,32 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 611.8817520780693, - "y": 498.51485539383566, + "x": 636.0736300895035, + "y": 499.1657189777844, "strokeColor": "#868e96", "backgroundColor": "#a5d8ff", - "width": 151.9206175424648, - "height": 0.6508635839487624, + "width": 127.72873953103067, + "height": 0, "seed": 1993419479, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1723366267517, + "updated": 1723586689935, "link": null, "locked": false, - "startBinding": null, - "endBinding": null, + "startBinding": { + "elementId": "_bejbInpe841KozyRNFWp", + "focus": 0.08099379287662284, + "gap": 8.413870996785704, + "fixedPoint": null + }, + "endBinding": { + "elementId": "axmsPDPSvj5kjY9Dvz3XL", + "focus": -0.05132123965837411, + "gap": 10.003990000000044, + "fixedPoint": null + }, "lastCommittedPoint": null, "startArrowhead": null, "endArrowhead": "triangle", @@ -988,16 +934,16 @@ 0 ], [ - 151.9206175424648, - 0.6508635839487624 + 127.72873953103067, + 0 ] ], "elbowed": false }, { "type": "text", - "version": 237, - "versionNonce": 1733213497, + "version": 265, + "versionNonce": 1352139591, "index": "b0S", "isDeleted": false, "id": "OCxufyzqo4TOqHr_J2rSo", @@ -1007,7 +953,7 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 460.32613449026246, + "x": 484.32613449026246, "y": 518.0865352388536, "strokeColor": "#2f9e44", "backgroundColor": "#f8f1ee", @@ -1018,7 +964,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1723366006306, + "updated": 1723586365526, "link": null, "locked": false, "fontSize": 16, @@ -1070,8 +1016,8 @@ }, { "type": "text", - "version": 210, - "versionNonce": 444902073, + "version": 257, + "versionNonce": 621843271, "index": "b0U", "isDeleted": false, "id": "h5cfy2pJ5gzDQjTyk0lJU", @@ -1081,27 +1027,27 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 387.10600743168243, - "y": 561.7816767980527, + "x": 255.5706818991594, + "y": 563.7816767980527, "strokeColor": "#1e1e1e", "backgroundColor": "#f8f1ee", - "width": 33.40007019042969, + "width": 185.40077209472656, "height": 35, "seed": 616654391, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1723366522089, + "updated": 1723586421655, "link": null, "locked": false, "fontSize": 28, "fontFamily": 8, - "text": "-L", + "text": "LocalForward", "textAlign": "right", "verticalAlign": "top", "containerId": null, - "originalText": "-L", + "originalText": "LocalForward", "autoResize": true, "lineHeight": 1.25 } diff --git a/docs/ssh-port-forwarding.png b/docs/ssh-port-forwarding.png index 484bf4c..ed999dc 100644 Binary files a/docs/ssh-port-forwarding.png and b/docs/ssh-port-forwarding.png differ diff --git a/docs/ssh-port-forwarding.svg b/docs/ssh-port-forwarding.svg deleted file mode 100644 index f62c205..0000000 --- a/docs/ssh-port-forwarding.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - Remote Port Forwarding (-R):[bind_address:]portremote_sockethost:hostportlocal_socketListenOpenRemoteLocalto new port or socketexisting port or socket-RLocal Port Forwarding (-L):[bind_address:]portlocal_sockethost:hostportremote_socketListenOpenLocalRemoteto new port or socketexisting port or socket-L \ No newline at end of file diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 5945ffc..2aab742 100644 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -55,7 +55,6 @@ if [ -z "${CLIENT_AUTHORIZED_KEYS}" ]; then else # Split the CLIENT_AUTHORIZED_KEYS variable by semicolon and add each to authorized_keys echo "${CLIENT_AUTHORIZED_KEYS}" | tr ';' '\n' | while IFS= read -r key; do - # Process each key here echo "${key}" >>"${HOME}/.ssh/authorized_keys" done chmod 600 "${HOME}/.ssh/authorized_keys"