This repository was archived by the owner on Nov 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -84,21 +84,23 @@ RUN ( \
84
84
echo "# Exit on errors or unset variables" ; \
85
85
echo "" ; \
86
86
echo "" ; \
87
- echo "# Create SSH keys, if necessary" ; \
87
+ echo "# Create and cat SSH keys, if necessary" ; \
88
88
echo "#" ; \
89
89
echo "chown -R autossh:autossh /home/autossh" ; \
90
90
echo "[ -f /home/autossh/.ssh/id_rsa.pub ]|| \\ " ; \
91
+ echo "{" ; \
91
92
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 "}" ; \
92
100
echo "" ; \
93
101
echo "" ; \
94
- echo "# Cat and test SSH keys " ; \
102
+ echo "# Verify public key is loaded and populate known_hosts " ; \
95
103
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" ; \
102
104
echo "/sbin/setuser autossh ssh -p \$ {PORT_AUTOSSH} autossh@\$ {IP_HUB} -o StrictHostKeyChecking=no 'hostname; exit'" ; \
103
105
) \
104
106
>> /app/ssh_config.sh; \
You can’t perform that action at this time.
0 commit comments