2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Have Genesis better work with BMC install

In a BMC install, the certificate may fail and we may
have ability to port forward 3389 but not 22.

Support normal and enhanced certificate behavior
when possible, but degrade to cert-less ssh and
also port 3389
This commit is contained in:
Jarrod Johnson 2021-01-15 08:25:12 -05:00
parent f7a940227d
commit a5c4b64c60

View File

@ -28,6 +28,8 @@ modprobe hfi1
modprobe mlx5_ib
echo "done"
cat > /etc/ssh/sshd_config << EOF
Port 22
Port 3389
PermitRootLogin yes
AuthorizedKeysFile .ssh/authorized_keys
EOF
@ -81,7 +83,9 @@ for pubkey in /etc/ssh/ssh_host*key.pub; do
certfile=${pubkey/.pub/-cert.pub}
privfile=${pubkey%.pub}
/usr/libexec/platform-python /opt/confluent/bin/apiclient /confluent-api/self/sshcert $pubkey > $certfile
echo HostCertificate $certfile >> /etc/ssh/sshd_config
if [ -s $certfile ]; then
echo HostCertificate $certfile >> /etc/ssh/sshd_config
fi
echo HostKey $privfile >> /etc/ssh/sshd_config
done
/usr/sbin/sshd
@ -95,11 +99,3 @@ run_remote onboot.sh
while :; do
bash
done
cd -