declare -a DEFAULT_NAME_SERVERS=(
'217.66.52.10'
- '93.188.109.13'
- '212.91.225.75'
+ '93.188.109.12'
+ '93.188.104.82'
)
declare -a NAME_SERVERS=()
}
+#------------------------------------------------------------------------------
+regenerate_rha_hostkey() {
+
+ local ssh_dir=/etc/ssh
+
+ empty_line
+ if [[ ! -d "${ssh_dir}" ]] ; then
+ error "Directory '${RED}${ssh_dir}${NORMAL}' not found!"
+ return
+ fi
+
+ info "Removing old SSH RSA host key ..."
+ rm -vf "${ssh_dir}/ssh_host_rsa_key"*
+
+ info "Generate new SSH RSA host keys with ${CYAN}4096${NORMAL} bits ..."
+ ssh-keygen -q -N "" -t rsa -b 4096 -f "${ssh_dir}/ssh_host_rsa_key"
+ if [[ -f "${ssh_dir}/ssh_host_rsa_key" ]] ; then
+ chgrp --verbose ssh_keys "${ssh_dir}/ssh_host_rsa_key"
+ else
+ error "The SSH RSA host key ${RED}${ssh_dir}/ssh_host_rsa_key was not generated${NORMAL}."
+ fi
+
+ ls -l "${ssh_dir}/ssh_host_"*
+
+}
+
#------------------------------------------------------------------------------
do_backup() {
check_for_root
- empty_line
- empty_line
+ regenerate_rha_hostkey
do_backup
generate