SSH クライアントはポート 22 で公開鍵認証を試みません。

SSH クライアントはポート 22 で公開鍵認証を試みません。

公開鍵(DSA)を使用して、Ubuntuシステム(Win 10のVM)からLinuxサーバーへのSSHを試しています。ただし、/etc/ssh/ssh_configに次の行を追加したにもかかわらず、UbuntuのOpenSSHクライアントは公開鍵を認証方法として使用しようとしません。

PubkeyAuthentication yes
PubkeyAcceptedKeyTypes +ssh-dss. 

.sshディレクトリの権限は700に設定され、id_dsaファイルの権限は600に設定されます。

デバッグログは次のとおりです。

The authenticity of host '************' can't be established.
RSA key fingerprint is SHA256:cPAuJmw7PjOgBYDN2TYfFscDVTbcsj0rT6HFJH9SDFI.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '*****************' (RSA) to the list of known hosts.
debug2: bits set: 4095/8192
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: .ssh/id_dsa  explicit
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic
debug3: start over, passed a different list gssapi-keyex,gssapi-with-mic
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)


debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)


debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
*****************: Permission denied (gssapi-keyex,gssapi-with-mic).

誰かが公開鍵が認証方法にない理由を説明できますか?

debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic

よろしくお願いします。

修正する:

サーバーの他のポート(2222)でsshdを起動して接続できました。したがって、問題はポート22にあります。何らかの理由で、サーバーは公開鍵認証を許可しません。ポート 22 を使用すると、ログに以下が表示されます。

debug1: Authentications that can continue: gssapi-keyex,gssapi-with-mic 

ここで、サーバーはポート22で私のユーザーIDの公開鍵認証を許可しませんが、サーバーはポート2222で公開鍵認証を許可します。

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic

サーバーがポート22で私のユーザーIDの公開鍵認証を許可しないのはなぜですか?

ベストアンサー1

問題は私のインターネット接続にあります。ポート 22 で公開鍵認証を許可しません。別の接続に切り替えた後、SSH公開鍵認証が正しく機能します。

おすすめ記事