これがセットアップです。
24 時間前までは、パスワードなしの ssh ログインのキーは正常に機能していました。私たちは正時に毎時使用しました。
その後、誤ってこのコマンドを実行しましたssh-keygen -e -f ~/.ssh/id_rsa > ~/.ssh/id_dsa_com.pub
それ以来、私のサーバーはいずれもパスワードの入力を求めることなく sftp サーバーにアクセスできません。
SELinux が許可されているか無効になっている
権限は次のとおりです。
[user@localserver .ssh]$ l
total 32
drwx------. 2 user user 4096 Jan 22 09:24 .
drwx------. 4 user user 4096 Jan 22 09:24 ..
-rw-r--r--. 1 user user 742 Jan 21 16:32 authorized_keys
-rw-------. 1 user user 668 Jan 21 16:25 id_dsa
-rw-r--r--. 1 user user 612 Jan 21 16:25 id_dsa.pub
-rw-------. 1 user user 1675 Jan 21 16:39 id_rsa
-rw-r--r--. 1 user user 404 Jan 21 16:39 id_rsa.pub
-rw-rw-rw-. 1 user user 252 Jan 21 16:21 known_hosts
-vvv を使用してデバッグを有効にすると、authorized_keys ファイルも確認されません。
Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/identity
debug3: no such identity: /home/user/.ssh/identity
debug1: Offering public key: /home/user/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 384 bytes for a total of 1781
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: /home/user/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 528 bytes for a total of 2309
debug1: Authentications that can continue: publickey,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password