#!/bin/bash

# Настройка таймзоны:
echo "Europe/Moscow" > /etc/timezone
[ -s /usr/share/zoneinfo/Europe/Moscow ] && cp -f /usr/share/zoneinfo/Europe/Moscow /etc/localtime
dpkg-reconfigure -f noninteractive tzdata

# Настройка SSHD:
sed -i -e "s/^PermitRootLogin.*/PermitRootLogin without-password/" /etc/ssh/sshd_config
sed -i -e "s/^#PermitRootLogin.*/PermitRootLogin without-password/" /etc/ssh/sshd_config
sed -i -e "s/.*MaxStartups .*/MaxStartups 100/" /etc/ssh/sshd_config
sed -i -e "s/LogLevel.*/LogLevel VERBOSE/" /etc/ssh/sshd_config
sed -i -e "s/^#LogLevel.*/LogLevel VERBOSE/" /etc/ssh/sshd_config

# Настройка ntp:
ntpdate -u ntp.yandex.net >/dev/null 2>&1
ln -svf /etc/ntp.conf.yandex /etc/ntp.conf

service ntp restart
service ssh restart
