mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Added ssh logic for auto accepting of keys
This commit is contained in:
@@ -107,11 +107,26 @@ if (whiptail --title "Security Onion Setup" --yesno "Are you sure you want to in
|
|||||||
|
|
||||||
chown -R 939:939 /opt/so
|
chown -R 939:939 /opt/so
|
||||||
|
|
||||||
|
# Add the grain
|
||||||
|
# Create the sls file
|
||||||
if [ $INSTALLTYPE == 'SENSORONLY' ]; then
|
if [ $INSTALLTYPE == 'SENSORONLY' ]; then
|
||||||
|
|
||||||
|
#Do the grains file
|
||||||
|
|
||||||
service salt-minion start
|
service salt-minion start
|
||||||
salt-call state.highstate
|
salt-call state.highstate
|
||||||
# Script to accept key on the master
|
touch /tmp/$HOSTNAME.sls
|
||||||
|
echo "sensor:" > /tmp/$HOSTNAME.sls
|
||||||
|
echo " interface: bond0" >> /tmp/$HOSTNAME
|
||||||
|
echo " lbprocs: $LBPROCS" >> /tmp/$HOSTNAME
|
||||||
|
|
||||||
|
# SCP the pillar file to the master
|
||||||
|
scp /tmp/$HOSTNAME.sls socore@$MASTERSRV:/opt/so/saltstack/pillar/sensors/
|
||||||
|
|
||||||
|
# Accept the key on the master
|
||||||
|
ssh socore@$MASTERSRV 'sudo salt-key -qa $HOSTNAME'
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
# They did not want to do the install
|
# They did not want to do the install
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user