I have two servers. Say A and B.I ssh-copy-ided on both servers to each other.And I can connect from A to B without password. But I failed to connect from B to A.I found that audit log is differentB's log when connecting from A to B (success)    ... (hostname=192.168.0.1, addr=192.168.0.1, terminal=sshd ref=successA's log when connecting from B to A (failed)    ... (hostname=?, addr=192.168.0.1, terminal=sshd ref=failedWhere should I look into?Here comes what ssh -v showed.$ ssh -v user@<a's ip address>OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Applying options for *debug1: Connecting to <a_ip_address> [a_ip_address] port 22.debug1: Connection established.debug1: identity file /home/user/.ssh/identity type -1debug1: identity file /home/user/.ssh/id_rsa type 1debug1: identity file /home/user/.ssh/id_dsa type -1debug1: loaded 3 keysdebug1: Remote protocol version 2.0, remote software version OpenSSH_4.3debug1: match: OpenSSH_4.3 pat OpenSSH*debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_4.3debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: server->client aes128-cbc hmac-md5 nonedebug1: kex: client->server aes128-cbc hmac-md5 nonedebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sentdebug1: expecting SSH2_MSG_KEX_DH_GEX_GROUPdebug1: SSH2_MSG_KEX_DH_GEX_INIT sentdebug1: expecting SSH2_MSG_KEX_DH_GEX_REPLYdebug1: Host '<a_ip_address>' is known and matches the RSA host key.debug1: Found key in /home/<user>/.ssh/known_hosts:8debug1: ssh_rsa_verify: signature correctdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: SSH2_MSG_SERVICE_REQUEST sentdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickey,gssapi-with-mic,passworddebug1: Next authentication method: gssapi-with-micdebug1: Unspecified GSS failure.  Minor code may provide more informationUnknown code krb5 195debug1: Unspecified GSS failure.  Minor code may provide more informationUnknown code krb5 195debug1: Unspecified GSS failure.  Minor code may provide more informationUnknown code krb5 195debug1: Next authentication method: publickeydebug1: Trying private key: /home/<user>/.ssh/identitydebug1: Offering public key: /home/<user>/.ssh/id_rsadebug1: Authentications that can continue: publickey,gssapi-with-mic,passworddebug1: Trying private key: /home/<user>/.ssh/id_dsadebug1: Next authentication method: passworduser@<a_ip_address>'s password:
ssh is not aware of client hostname?
ssh
The root cause of my problem is that the home directory, the .ssh directory, and its child files on the target sever have a wrong permissions.I discovered this issue by looking at messages in log files in /var/log such as secure, and audit/*.