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

Commit

Permalink
SSH key test now happening on every gateway reload
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Nov 27, 2015
1 parent f3110cb commit a9f9414
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions gateway/0.1.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,23 @@ RUN ( \
echo "# Exit on errors or unset variables"; \
echo ""; \
echo ""; \
echo "# Create SSH keys, if necessary"; \
echo "# Create and cat SSH keys, if necessary"; \
echo "#"; \
echo "chown -R autossh:autossh /home/autossh"; \
echo "[ -f /home/autossh/.ssh/id_rsa.pub ]|| \\"; \
echo "{"; \
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"; \
echo " cat /home/autossh/.ssh/id_rsa.pub"; \
echo " echo"; \
echo " echo"; \
echo " echo 'Copy the public key above, then press Enter to test it'"; \
echo " echo"; \
echo " read ENTER_TO_CONTINUE"; \
echo "}"; \
echo ""; \
echo ""; \
echo "# Cat and test SSH keys"; \
echo "# Verify public key is loaded and populate known_hosts"; \
echo "#"; \
echo "cat /home/autossh/.ssh/id_rsa.pub"; \
echo "echo"; \
echo "echo"; \
echo "echo 'Copy the public key above, then press Enter to test it'"; \
echo "echo"; \
echo "read ENTER_TO_CONTINUE"; \
echo "/sbin/setuser autossh ssh -p \${PORT_AUTOSSH} autossh@\${IP_HUB} -o StrictHostKeyChecking=no 'hostname; exit'"; \
) \
>> /app/ssh_config.sh; \
Expand Down

0 comments on commit a9f9414

Please sign in to comment.