From 6ba9099e7cf9324ccb0c7a5ad41b426585bd029e Mon Sep 17 00:00:00 2001 From: Kevin Baensch Date: Mon, 21 Nov 2022 17:47:41 +0100 Subject: [PATCH] Set host bound sshd port to 3022. --- docker-compose-sqlproxy.yml | 2 +- sqlproxy_setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-sqlproxy.yml b/docker-compose-sqlproxy.yml index 04c2437..40c5db9 100644 --- a/docker-compose-sqlproxy.yml +++ b/docker-compose-sqlproxy.yml @@ -7,7 +7,7 @@ services: dockerfile: ./Dockerfile command: ["./sqlproxy.sh", "&", "wait", "$!" ] ports: - - 22:22 + - 3022:22 volumes: - ./etc/ssh:/etc/ssh/ - /var/run/docker.sock:/tmp/docker.sock:ro diff --git a/sqlproxy_setup.sh b/sqlproxy_setup.sh index 07967bb..d8a59a8 100755 --- a/sqlproxy_setup.sh +++ b/sqlproxy_setup.sh @@ -41,7 +41,7 @@ case $GEN_KEYS in grep -qe "^Host $HOST_NAME$" $HOME/.ssh/config if [ $? -ne 0 ] then - echo -ne "\n\nHost $HOST_NAME\n User sqlproxy\n IdentityFile ~/.ssh/$KEY_NAME.key" >> $HOME/.ssh/config + echo -ne "\nHost $HOST_NAME\n Port 3022\n User sqlproxy\n IdentityFile ~/.ssh/$KEY_NAME.key" >> $HOME/.ssh/config fi # Check if public key is already in the containers authorized_keys file grep -qe "$(cat $HOME/.ssh/$KEY_NAME.key.pub)$" $PROJECT_PATH/etc/ssh/.ssh/authorized_keys