From 275ed60a50e44cf0dc302d39fcfeb9ecc83fcd4f Mon Sep 17 00:00:00 2001 From: Krzysztof Szumny Date: Sat, 22 Aug 2015 17:13:22 +0200 Subject: [PATCH] fix for missing permissions of id_rsa, envs are available even in ssh sessions --- {{cookiecutter.repo_name}}/compose/debug/entrypoint.sh | 4 +++- {{cookiecutter.repo_name}}/compose/debug/sshd_config | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/compose/debug/entrypoint.sh b/{{cookiecutter.repo_name}}/compose/debug/entrypoint.sh index 228ed17a3..11851f6cc 100755 --- a/{{cookiecutter.repo_name}}/compose/debug/entrypoint.sh +++ b/{{cookiecutter.repo_name}}/compose/debug/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash -/app/compose/django/entrypoint.sh : +/app/compose/django/entrypoint.sh 'env > /tmp/environment' USER=docker_{{ cookiecutter.repo_name }} @@ -14,6 +14,8 @@ cat /app/compose/debug/keys_to_docker/id_rsa.pub > /home/$USER/.ssh/authorized_k chmod 755 /home/$USER chmod 700 /home/$USER/.ssh chmod 600 /home/$USER/.ssh/authorized_keys +cp /tmp/environment /home/$USER/.ssh/environment + chown -R $USER:$USER /home/$USER echo "$USER:docker" | chpasswd diff --git a/{{cookiecutter.repo_name}}/compose/debug/sshd_config b/{{cookiecutter.repo_name}}/compose/debug/sshd_config index fee6e169a..dfe7ae80e 100644 --- a/{{cookiecutter.repo_name}}/compose/debug/sshd_config +++ b/{{cookiecutter.repo_name}}/compose/debug/sshd_config @@ -79,3 +79,5 @@ PrintMotd no KeepAlive yes PrintLastLog yes UsePAM yes + +PermitUserEnvironment yes