Skip to content

Commit 507174f

Browse files
Keonik1missytake
authored andcommitted
Delete ssh connection from docker installation
- #614 (comment) - #614 (comment) - #614 (comment) - #614 (comment)
1 parent a0c1510 commit 507174f

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

docker/chatmail_relay.dockerfile

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/01norecommend && \
1818

1919
RUN apt-get update && \
2020
apt-get install -y \
21-
openssh-client \
22-
openssh-server \
2321
git \
2422
python3 \
2523
python3-venv \
@@ -54,23 +52,6 @@ RUN apt-get update && \
5452
done \
5553
&& rm -rf /var/lib/apt/lists/*
5654

57-
RUN systemctl enable \
58-
ssh \
59-
fcgiwrap
60-
61-
RUN sed -i 's/^#PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config && \
62-
sed -i 's/^#PermitRootLogin .*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config && \
63-
ssh-keygen -P "" -t rsa -b 2048 -f /root/.ssh/id_rsa && \
64-
mkdir -p /root/.ssh && \
65-
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys && \
66-
SSH_USER_CONFIG="/root/.ssh/config" && \
67-
echo "Host localhost" > "$SSH_USER_CONFIG" && \
68-
echo " HostName localhost" >> "$SSH_USER_CONFIG" && \
69-
echo " User root" >> "$SSH_USER_CONFIG" && \
70-
echo " StrictHostKeyChecking no" >> "$SSH_USER_CONFIG" && \
71-
echo " UserKnownHostsFile /dev/null" >> "$SSH_USER_CONFIG"
72-
## TODO: deny access for all insteed root form 127.0.0.1 https://unix.stackexchange.com/a/406264
73-
7455
WORKDIR /opt/chatmail
7556

7657
ARG SETUP_CHATMAIL_SERVICE_PATH=/lib/systemd/system/setup_chatmail.service

docker/files/setup_chatmail_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fi
7070
./scripts/cmdeploy init --config "${INI_FILE}" $INI_CMD_ARGS $MAIL_DOMAIN
7171
bash /update_ini.sh
7272

73-
./scripts/cmdeploy run --ssh-host localhost --skip-dns-check
73+
./scripts/cmdeploy run --ssh-host docker --skip-dns-check
7474

7575
echo "ForwardToConsole=yes" >> /etc/systemd/journald.conf
7676
systemctl restart systemd-journald

0 commit comments

Comments
 (0)