#!/bin/bash
wd=$(pwd)
cd /etc/ssh/
sudo tar cfv $wd/resources/ossdipinstaller/hostkeys.tar ssh_host*

cd $wd
key=$(cat /etc/ssh/ssh_host_ed25519_key.pub)

# generate known_hosts file
cat <<EOF > $wd/resources/ossdipinstaller/known_hosts
procssrv02,172.27.48.1 $key
proinstaller,172.27.48.2 $key
promonitoring,172.27.48.3 $key
prodata,172.27.48.4 $key
progate,172.27.48.30 $key
vpncssrv02,172.27.48.130 $key
vpnvpn,172.27.48.130 $key
vpninstaller,172.27.48.131 $key
vpngate,172.27.48.254 $key
vnccssrv02,172.27.48.65 $key
vncgate,172.27.48.126 $key
owngate,172.28.49.254 $key
anagate,172.27.49.126 $key
EOF