mirror of
https://github.com/openoms/joininbox.git
synced 2026-08-15 12:50:37 +02:00
15 lines
460 B
Bash
15 lines
460 B
Bash
|
|
#!/bin/bash
|
||
|
|
# based on https://github.com/rootzoll/raspiblitz/blob/v1.6/home.admin/_bootstrap.sh
|
||
|
|
# used when running standalone
|
||
|
|
|
||
|
|
################################
|
||
|
|
# GENERATE UNIQUE SSH PUB KEYS
|
||
|
|
# on first boot up
|
||
|
|
################################
|
||
|
|
|
||
|
|
numberOfPubKeys=$(sudo ls /etc/ssh/ | grep -c 'ssh_host_')
|
||
|
|
if [ ${numberOfPubKeys} -eq 0 ]; then
|
||
|
|
echo "*** Generating new SSH PubKeys" >> $logFile
|
||
|
|
sudo dpkg-reconfigure openssh-server
|
||
|
|
echo "OK" >> $logFile
|
||
|
|
fi
|