sshでログインできるユーザーを決めましょう

9:40 pm FreeBSD

SSHセキュリティ対策の第二弾です。と言っても対策はとっても簡単、「sshd_config」に「AllowUsers」を追加するだけです。

%vi /etc/ssh/sshd_config

AllowUsers ユーザー1 ユーザー2

以上のようにSSH接続を許可するユーザーを追加していきましょう。追加が完了したら忘れずにsshの再起動を行います。

%/etc/rc.d/sshd restart

以上で接続できるユーザーが限定できました。

 

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.