2020-05-19 16:22:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
cp -a /root/.ssh /target/root/
|
|
|
|
mkdir -p /target/etc/confluent/ssh/sshd_config.d/
|
2020-05-19 17:36:49 +00:00
|
|
|
chmod 700 /target/etc/confluent
|
2020-05-19 16:22:46 +00:00
|
|
|
cp /custom-installation/confluent/* /target/etc/confluent/
|
2020-05-20 13:33:38 +00:00
|
|
|
cp -a /custom-installation/tls /target/etc/confluent/
|
2020-05-19 17:36:49 +00:00
|
|
|
chmod go-rwx /etc/confluent/*
|
2020-05-19 16:22:46 +00:00
|
|
|
for i in /custom-installation/ssh/*.ca; do
|
|
|
|
echo '@cert-authority *' $(cat $i) >> /target/etc/ssh/ssh_known_hosts
|
|
|
|
done
|
|
|
|
|
|
|
|
cp -a /etc/ssh/ssh_host* /target/etc/confluent/ssh/
|
|
|
|
cp -a /etc/ssh/sshd_config.d/confluent.conf /target/etc/confluent/ssh/sshd_config.d/
|
|
|
|
sshconf=/target/etc/ssh/ssh_config
|
|
|
|
if [ -d /target/etc/ssh/ssh_config.d/ ]; then
|
|
|
|
sshconf=/target/etc/ssh/ssh_config.d/01-confluent.conf
|
|
|
|
fi
|
|
|
|
echo 'Host *' >> $sshconf
|
|
|
|
echo ' HostbasedAuthentication yes' >> $sshconf
|
|
|
|
echo ' EnableSSHKeysign yes' >> $sshconf
|
|
|
|
echo ' HostbasedKeyTypes *ed25519*' >> $sshconf
|
|
|
|
|
|
|
|
curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.sh > /target/etc/confluent/firstboot.sh
|
|
|
|
chmod +x /target/etc/confluent/firstboot.sh
|
|
|
|
cp /tmp/allnodes /target/root/.shosts
|
|
|
|
cp /tmp/allnodes /target/etc/ssh/shosts.equiv
|
|
|
|
|