クラスタ上の共有ファイルシステムでは、他のマシンでは成功しているものの、一部のマシンではパスワードなしでsshを実行できません

ユヴァル・アッツモン

ホームディレクトリがすべてのマシンで共有されているクラスターで実行しています。一部のマシンはRHELで、その他はUbuntuです。

RHEL-> RHELまたはUBUNTU-> RHELからパスワードなしでログインすると、成功します。しかし、何か-> UBUNTUを試してみると失敗し、手動でパスワードを入力する必要があります。

編集1:一部のUbuntuマシンに接続しようとした場合にのみ失敗します。他のUbuntuマシンへの接続は成功しています。

~~/.sshtochmod 700authorized_keystoの設定を確認しましたが、chmod 600役に立ちませんでした。

EDIT2:私はの出力の下に追加しました namei -lx ~/.ssh/authorized_keys

EDIT3:sudoを使用しているマシンでデバッグモードのsshの出力を下に追加しました。驚くべきことに(上記ではありAuthentication refused: bad ownership or modes for file /home/lab/my_user/.ssh/authorized_keysますが)、それは言います。

sshキーを削除して再作成しましたが、成功しませんでした(sshからsudo以外のマシンは引き続き機能し、sshからwith-sudoは機能しません)。私が使用したコマンドは次のとおりです。

ssh-keygen -t rsa
ssh-copy-id -i id_rsa.pub ubuntu_machine_name

これが実行時の出力です ssh -vv host

[my_user@ctx01 .ssh]$ ssh -vv 10.20.30.40
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options or *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.20.30.40 [10.20.30.40] port 22.
debug1: Connection established.
debug1: identity file /home/lab/my_user/.ssh/identity type -1
debug1: identity file /home/lab/my_user/.ssh/identity-cert type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/lab/my_user/.ssh/id_rsa type 1
debug1: identity file /home/lab/my_user/.ssh/id_rsa-cert type -1
debug1: identity file /home/lab/my_user/.ssh/id_dsa type -1
debug1: identity file /home/lab/my_user/.ssh/id_dsa-cert type -1
debug1: identity file /home/lab/my_user/.ssh/id_ecdsa type -1
debug1: identity file /home/lab/my_user/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 130/256
debug2: bits set: 480/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '10.20.30.40' is known and matches the RSA host key.
debug1: Found key in /home/lab/my_user/.ssh/known_hosts:1
debug2: bits set: 519/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-my_userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/lab/my_user/.ssh/identity ((nil))
debug2: key: /home/lab/my_user/.ssh/id_rsa (0x7f412fd53880)
debug2: key: /home/lab/my_user/.ssh/id_dsa ((nil))
debug2: key: /home/lab/my_user/.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/lab/my_user/.ssh/identity
debug1: Offering public key: /home/lab/my_user/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/lab/my_user/.ssh/id_dsa
debug1: Trying private key: /home/lab/my_user/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
[email protected]'s password:

これがの出力です namei -lx ~/.ssh/authorized_keys

f: /home/lab/my_user/.ssh/authorized_keys
Drwxr-xr-x root   root    /
drwxr-xr-x root   root    home
Drwxr-xr-x nobody nogroup lab
drwx------ nobody nogroup my_user
drwx------ nobody nogroup .ssh
-rw------- nobody nogroup authorized_keys

デバッグモードでのsshの出力は次のとおりです。

debug1: userauth-request for user my_user service ssh-connection method publickey [preauth]
debug1: attempt 1 failures 0 [preauth]
debug1: test whether pkalg/pkblob are acceptable [preauth]
debug1: temporarily_use_uid: 2117/505 (e=0/0)
debug1: trying public key file /home/lab/my_user/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
Authentication refused: bad ownership or modes for file /home/lab/my_user/.ssh/authorized_keys
debug1: restore_uid: 0/0
debug1: temporarily_use_uid: 2117/505 (e=0/0)
debug1: trying public key file /home/lab/my_user/.ssh/authorized_keys2
debug1: Could not open authorized keys '/home/lab/my_user/.ssh/authorized_keys2': No such file or directory
debug1: restore_uid: 0/0
Failed publickey for my_user from 10.20.30.40 port 48718 ssh2: RSA 90:42:ea:e3:79:b2:27:67:49:1b:17:0b:db:b6:ad:eb
ユヴァル・アッツモン

この問題は、NFSがUbuntuマシンで正しく構成されていないという事実に関連していました。私が行っls -lとき、ファイルの所有者とグループはでしたnobody nogroupNFS構成を修正すると、すべてうまくいきました。

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

Related 関連記事

ホットタグ

アーカイブ