OSX 10.7 で SSH Kerberos 認証を使用してサーバーに接続できない

OSX 10.7 で SSH Kerberos 認証を使用してサーバーに接続できない

Mac OS を 10.7 Lion にアップグレードしました。以前は問題なく動作していました。しかし、kinit今は正常に動作しているだけで、サーバーに ssh できません。

「Mac OS X Kerberos Extras」を再インストールしても、状況は改善されませんでした。

私の命令:

ssh [email protected] -v

......

debug1: Authentications that can continue: gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1:  Miscellaneous failure (see text)
UNKNOWN_SERVER while looking up 'host/[email protected]' (cached result, timeout in 1200 sec)

debug1:  An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14

debug1: Authentications that can continue: gssapi-with-mic,password
debug1:  An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5

debug1: Next authentication method: password
[email protected]'s password:

答え1

~/.ssh/configファイル内、または 内に次の 2 行がありますか/etc/ssh_config?

GSSAPIAuthentication yes
GSSAPITrustDNS yes

最初のものは GSSAPI (Kerberos) 認証を有効にするために必要であり、2 つ目は ssh が DNS 経由でホスト名を正規化し、正規名を使用してホスト サービス チケットを取得するために必要です。2 つ目のものがないと、ssh はコマンド ラインに入力された正確なホスト名または IP アドレスを使用してホスト サービス チケットを取得しようとしますが、この場合は失敗します。

'host/ を検索中に UNKNOWN_SERVER が発生しました[メールアドレス]'

プリンシパルの実際の名前は通常、IP アドレスではなく、「host/hostname.domain@REALM」です。もちろん、これを機能させるには正しい逆 DNS 設定が必要です。

また、OS X は使用する正しいレルム名を検出できず、代わりに IP アドレス (「@3.18.211」の部分) を使用しようとしているようです。レルムと KDC に正しい DNS TXT レコードと SRV レコードが設定されていますか? 設定されていない場合は、 にデフォルトのレルムと KDC アドレスを手動で入力する必要があります/etc/krb5.conf

答え2

Centos に接続するとこれらのエラーが発生しましたが、Fedora では発生しませんでした。OS X でユーザーを短い名前ではなく完全な userPrincipalName に変更することで解決しました。

~/.ssh/config:

Host svn saturnus.lan
User [email protected]

SSH 不明なメカコード エラー:

debug1: Next authentication method: gssapi-with-mic
debug2: we sent a gssapi-with-mic packet, wait for reply
debug1: Delegating credentials
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1:  An invalid name was supplied
unknown mech-code 0 for mech 1 2 752 43 14 2

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 5 14

debug2: we sent a gssapi-with-mic packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1:  An unsupported mechanism was requested
unknown mech-code 0 for mech 1 3 5 1 5 2 7

debug1:  Miscellaneous failure (see text)
unknown mech-code 0 for mech 1 3 6 1 5 2 5

debug2: we did not send a packet, disable method

関連情報