Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit a9f9414

Browse files
committed
SSH key test now happening on every gateway reload
1 parent f3110cb commit a9f9414

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

gateway/0.1.4/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,23 @@ RUN ( \
8484
echo "# Exit on errors or unset variables"; \
8585
echo ""; \
8686
echo ""; \
87-
echo "# Create SSH keys, if necessary"; \
87+
echo "# Create and cat SSH keys, if necessary"; \
8888
echo "#"; \
8989
echo "chown -R autossh:autossh /home/autossh"; \
9090
echo "[ -f /home/autossh/.ssh/id_rsa.pub ]|| \\"; \
91+
echo "{"; \
9192
echo " /sbin/setuser autossh ssh-keygen -b 4096 -t rsa -N \"\" -C dkey\${gID}-\$(date +%Y-%m-%d-%T) -f /home/autossh/.ssh/id_rsa"; \
93+
echo " cat /home/autossh/.ssh/id_rsa.pub"; \
94+
echo " echo"; \
95+
echo " echo"; \
96+
echo " echo 'Copy the public key above, then press Enter to test it'"; \
97+
echo " echo"; \
98+
echo " read ENTER_TO_CONTINUE"; \
99+
echo "}"; \
92100
echo ""; \
93101
echo ""; \
94-
echo "# Cat and test SSH keys"; \
102+
echo "# Verify public key is loaded and populate known_hosts"; \
95103
echo "#"; \
96-
echo "cat /home/autossh/.ssh/id_rsa.pub"; \
97-
echo "echo"; \
98-
echo "echo"; \
99-
echo "echo 'Copy the public key above, then press Enter to test it'"; \
100-
echo "echo"; \
101-
echo "read ENTER_TO_CONTINUE"; \
102104
echo "/sbin/setuser autossh ssh -p \${PORT_AUTOSSH} autossh@\${IP_HUB} -o StrictHostKeyChecking=no 'hostname; exit'"; \
103105
) \
104106
>> /app/ssh_config.sh; \

0 commit comments

Comments
 (0)