最初に、私はここでこの質問のすべてを試したが、それは私を助けてくれなかったと言いたい。 パスワードなしでlocalhostにSSH接続するにはどうすればいいですか?
私がタイプしたLinuxへのやり方がわからないので、私は最近ファイル許可問題を抱えていました chmod 700 -R /home
私は馬鹿だから。それは今日の私の問題と関係があるかもしれません。誰かがその問題を解決する手助けをしてくれましたが、SSHはファイルパーミッションに関して頑固なので、私はそれを立ち上げると思いました。
これがSSHの詳細な出力ログです。
[user@centos ~]$ ssh -v localhost
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/identity-cert type -1
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type 2
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
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
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'localhost' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:7
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_500' not found
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_500' not found
debug1: Unspecified GSS failure. Minor code may provide more information
debug1: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_500' not found
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug1: Offering public key: /home/user/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Offering public key: /home/user/.ssh/id_dsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/user/.ssh/id_ecdsa
debug1: Next authentication method: password
user@localhost's password:
これは、その内容と同様に.sshディレクトリに対するファイル許可です:
drwx------. 2 user user 4096 Jul 7 08:52 .ssh
drwx------. 2 user user 4096 Jul 7 08:52 .
drwxrwxr-x. 44 user user 4096 Jul 7 08:43 ..
-rw------- 1 user user 2183 Jul 7 08:52 authorized_keys
-rw------- 1 user user 672 Jul 7 08:52 id_dsa
-rw-r--r-- 1 user user 603 Jul 7 08:52 id_dsa.pub
-rw-------. 1 user user 1675 Jul 2 10:55 id_rsa
-rw-r--r--. 1 user user 395 Jul 2 10:55 id_rsa.pub
-rw-r--r-- 1 user user 2733 Jul 2 10:45 known_hosts
編集:誰かが/ var / log / secureの内容を要求したので、ここにあります。私の本名なので、私は自分のユーザー名を削除しました。
Jul 7 08:53:21 centos sshd[2611]: pam_unix(sshd:session): session opened for user *USERNAME REMOVED* by (uid=0)
Jul 7 08:55:25 centos sshd[2648]: Authentication refused: bad ownership or modes for directory /home/*USERNAME REMOVED*
Jul 7 08:55:25 centos sshd[2648]: Authentication refused: bad ownership or modes for directory /home/*USERNAME REMOVED*
Jul 7 08:56:59 centos sshd[2649]: Connection closed by ::1
誰かが私を手伝ってくれる?