Skip to content

Commit 289c6e9

Browse files
committed
Separate by comma instead of semicolon
1 parent a477b8c commit 289c6e9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The server image supports the following environment variables:
2121
| `SERVER_ED25519_PRIVATE_KEY_FILE` <br> _required_ | Path to the server's host private key (ed25519). The client needs to have the corresponding public key in `known_hosts`. |
2222
| `SERVER_ED25519_PRIVATE_KEY_BASE64` | Alternative to `SERVER_ED25519_PRIVATE_KEY_FILE` (base64-encoded value). |
2323
| `SERVER_ED25519_PUBLIC_KEY` | The server's host public key (ed25519). |
24-
| `CLIENT_AUTHORIZED_KEYS` <br> _required_ | The client public keys authorized to connect. The keys should be separated by semicolons (`;`). |
24+
| `CLIENT_AUTHORIZED_KEYS` <br> _required_ | The client public keys authorized to connect. The keys should be separated by commas (`,`). |
2525

2626
#### SSHD options
2727

@@ -128,7 +128,7 @@ ssh-keygen -t ed25519 -N '' -C key2-$(date -I) -f key2
128128
You can define the SSH tunnel using `SSH_REMOTE_FORWARD` and `SSH_LOCAL_FORWARD`
129129
variables of the client image. They map to `RemoteForward` and `LocalForward` options in `ssh_config`.
130130

131-
Each of these variables can have multiple port forwarding rules separated by semicolons (`;`).
131+
Each of these variables can have multiple port forwarding rules separated by commas (`,`).
132132

133133
By default, TCP forwarding is disabled in the server image.
134134
To enable port forwarding,

client/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ SessionType ${SSH_SESSION_TYPE:-none}
7272
RequestTTY no
7373
" >"${HOME}/.ssh/config"
7474
if [ -n "${SSH_REMOTE_FORWARD}" ]; then
75-
echo "${SSH_REMOTE_FORWARD}" | tr ';' '\n' | while IFS= read -r remote_forward; do
75+
echo "${SSH_REMOTE_FORWARD}" | tr ',' '\n' | while IFS= read -r remote_forward; do
7676
echo "RemoteForward ${remote_forward}" >>"${HOME}/.ssh/config"
7777
done
7878
fi
7979
if [ -n "${SSH_LOCAL_FORWARD}" ]; then
80-
echo "${SSH_LOCAL_FORWARD}" | tr ';' '\n' | while IFS= read -r local_forward; do
80+
echo "${SSH_LOCAL_FORWARD}" | tr ',' '\n' | while IFS= read -r local_forward; do
8181
echo "LocalForward ${local_forward}" >>"${HOME}/.ssh/config"
8282
done
8383
fi

server/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if [ -z "${CLIENT_AUTHORIZED_KEYS}" ]; then
5454
exit 1
5555
else
5656
# Split the CLIENT_AUTHORIZED_KEYS variable by semicolon and add each to authorized_keys
57-
echo "${CLIENT_AUTHORIZED_KEYS}" | tr ';' '\n' | while IFS= read -r key; do
57+
echo "${CLIENT_AUTHORIZED_KEYS}" | tr ',' '\n' | while IFS= read -r key; do
5858
echo "${key}" >>"${HOME}/.ssh/authorized_keys"
5959
done
6060
chmod 600 "${HOME}/.ssh/authorized_keys"

0 commit comments

Comments
 (0)