環境
# cat /etc/redhat-release
CentOS release 6.5 (Final)
# uname -a
Linux XXXXX 2.6.32-431.20.5.el6.x86_64 #1 SMP Fri Jul 25 08:34:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
visudo
# visudo
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL #コメントアウト
user作成
# useradd XXX
# passwd XXX
# usermod -G wheel XXX
ssh鍵
$cd
$mkdir .ssh
$chmod 700 .ssh
$cd .ssh
$ssh-keygen -t rsa -v
$mv id_rsa.pub authorized_keys
id_rsa を接続したいPCに保存
sshの設定
# diff sshd_config sshd_config.org
13c13
< Port XXXX
---
> #Port 22
42c42
< PermitRootLogin no
---
> #PermitRootLogin yes
66c66
< PasswordAuthentication no
---
> PasswordAuthentication yes
再起動
# service sshd restart
local
.ssh/config
Host XXXX
HostName XXXX
User XXX
Port XXXX
IdentityFile ~/.ssh/id_rsa
ログイン
$ssh XXXX
httpd インストール
# yum -y install httpd
logwatch インストール
# yum install logwatch
# logwatch --print
# logwatch --mailto foo@example.com
設定
/etc/logwatch/conf/logwatch.conf
MailTo=foo@example.com
DenyHostsのインストール
# yum install denyhosts
# service denyhosts start
# chkconfig denyhosts on