sshd:外部LANでパスワード認証を無効にしているときに問題が発生しました。

sshd:外部LANでパスワード認証を無効にしているときに問題が発生しました。

2つのネットワークカードを持つCentOS 7サーバーがあります。 1つはプライベートIP 192.168.1.1(lan0)を持つLAN内にあり、もう1つはパブリックインターネットIP(ppp0)です。

LAN内で開始される接続の場合は、パスワードまたは公開鍵認証を使用できることを願っています。

インターネット接続には公開鍵のみが必要です。私は/etc/ssh/sshd_configでこれを行いました。

PasswordAuthentication No

最後の数行は次のとおりです。

Match address 192.168.1.0/24
    PasswordAuthentication yes

そのため、テストのために私が所有している別のコンピュータ(インターネット上のVPSなど)にログインし、SSH経由でログインしようとしました。予想通り、次のような結果が得られた。

Permission denied (publickey).

しかし、私が理解していないのは、なぜ私の/var/log/secureが次のような無差別代入試行でいっぱいになるのかです:(IPが変更されました)

Apr 22 09:57:36 linuxhost1 sshd[15149]: input_userauth_request: invalid user webmaster [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15149]: Received disconnect from a.b.c.d: 11: Bye Bye [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15151]: Invalid user webmaster from a.b.c.d
Apr 22 09:57:36 linuxhost1 sshd[15151]: input_userauth_request: invalid user webmaster [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15151]: Received disconnect from a.b.c.d: 11: Bye Bye [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15153]: Invalid user webpop from a.b.c.d
Apr 22 09:57:36 linuxhost1 sshd[15153]: input_userauth_request: invalid user webpop [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15153]: Received disconnect from a.b.c.d: 11: Bye Bye [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15155]: Invalid user web from a.b.c.d
Apr 22 09:57:36 linuxhost1 sshd[15155]: input_userauth_request: invalid user web [preauth]
Apr 22 09:57:36 linuxhost1 sshd[15155]: Received disconnect from a.b.c.d: 11: Bye Bye [preauth]
Apr 22 09:57:37 linuxhost1 sshd[15157]: Invalid user william from a.b.c.d
Apr 22 09:57:37 linuxhost1 sshd[15157]: input_userauth_request: invalid user william [preauth]
Apr 22 09:57:37 linuxhost1 sshd[15157]: Received disconnect from a.b.c.d: 11: Bye Bye [preauth]
Apr 22 09:57:37 linuxhost1 sshd[15159]: Invalid user windowserver from a.b.c.d
Apr 22 09:57:37 linuxhost1 sshd[15159]: input_userauth_request: invalid user windowserver [preauth]
Apr 22 09:57:37 linuxhost1 sshd[15159]: Received disconnect from a.b.c.d: 11: Bye Bye [preauth]

これらの無差別代入攻撃者はどのようにusername

ベストアンサー1

これらの無差別代入攻撃者はどのようにusername

コマンドラインにユーザー名を入力します(または現在のユーザー名がデフォルトです)。常にユーザー名を入力する必要があります。これにより、接続をブロックするのではなく、firewalldパスワードiptables認証のみをブロックします。

もっと詳細な人のためにRFC4252、セクション5SSH_MSG_USERAUTH_REQUEST鍵交換後のメッセージを記述します。要求されたユーザー名を含むフィールドがあります。password拒否された認証を要求したり、鍵が盗まれたりしない限り、拒否された認証pubkeyを使用したりnone、デフォルトで使用可能な方法をリストしたりする要求である(セクション5.2)、最初に試す必要があります。 )。

おすすめ記事