Set host bound sshd port to 3022.

This commit is contained in:
Kevin Baensch 2022-11-21 17:47:41 +01:00
parent df4ce2a4b6
commit 6ba9099e7c
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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