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