SSH-エージェント-K

SSH-エージェント-K

Debian GNU/Linux 9 を実行する Debian マシンの仮想マシンが 2 台あります。次のプロセスを試してみましたが、まだパスワードの入力を求められます。 10.21.12.74ポート45962 ssh2 [preauth]のテスト用に延期された公開鍵のため失敗します。

OpenSSH_7.4p1 Debian-10+deb9u7、OpenSSL 1.0.2uがあります。 2019年12月20日

クライアントコンピュータで、公開鍵ペアと秘密鍵ペアと呼ばれるデフォルトのSSH鍵ペアを作成しました。

$ssh-keygen 

次に私は-

ssh-copy-id [email protected]

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh '[email protected]'"
and check to make sure that only the key(s) you wanted were added.

sshdサーバーは言います -

debug1: trying public key file /home/test/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug1: matching key found: file /home/test/.ssh/authorized_keys, line 1 RSA SHA256:VvQDLGFJdfO9FUOqa1ODV6iLT4Te0Nm5Bz1OUA57LjY
debug1: restore_uid: 0/0
debug3: mm_answer_keyallowed: key 0x564e7bdd0c70 is allowed
debug3: mm_request_send entering: type 23
debug3: send packet: type 60 [preauth]
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa [preauth]
Postponed publickey for test from 10.21.12.74 port 45962 ssh2 [preauth]

SSHクライアントが言う -

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/test/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp SHA256:VvQDLGFJdfO9FUOqa1ODV6iLT4Te0Nm5Bz1OUA57LjY
debug3: sign_and_send_pubkey: RSA SHA256:VvQDLGFJdfO9FUOqa1ODV6iLT4Te0Nm5Bz1OUA57LjY
sign_and_send_pubkey: signing failed: agent refused operation
debug1: Trying private key: /home/test/.ssh/id_dsa
debug3: no such identity: /home/test/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/test/.ssh/id_ecdsa
debug3: no such identity: /home/test/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/test/.ssh/id_ed25519
debug3: no such identity: /home/test/.ssh/id_ed25519: No such file or directory
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
[email protected]'s password: 

動作方法は、次のコマンドを使用してクライアントでssh-agentを終了することです。

SSH-エージェント-K

次に、マシンを再起動する必要があります。良い方法はありませんか?

ベストアンサー1

/etc/ssh/sshd_configにこのパラメータがあることを確認してください。

PubkeyAuthentication yes

SELinuxが有効になっている場合は、システムログを確認することをお勧めします。

おすすめ記事