Skip to content

Instantly share code, notes, and snippets.

@yyoshiki41
Last active December 31, 2015 14:35
Show Gist options
  • Save yyoshiki41/1cf8fae07ac51e929ce1 to your computer and use it in GitHub Desktop.
Save yyoshiki41/1cf8fae07ac51e929ce1 to your computer and use it in GitHub Desktop.

■sshd security

sudo vim /etc/ssh/sshd_config

sshdのProtocolを2に設定する

以下に、変更.

Protocol 2

ssh 認証時の時間や試行回数の制限

コネクションを貼って認証するまでの猶予時間LoginGraceTimeと、試行回数MaxAuthTriesを設定する。

LoginGraceTime 30
MaxAuthTries 3

sshd restart

sudo service sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]

■apache security

sudo vim /etc/httpd/conf/httpd.conf

エラーページのフッタにapacheの情報を付けない

ServerSignature Off

HTTPリプライヘッダの制御

ServerTokens ProductOnly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment