同じSSH設定が失敗します。

同じSSH設定が失敗します。

パテ設定が同じ2台のWindowsコンピュータがあります。同じエージェントコマンドを使用する同じキー、同じユーザーアカウント。これら2つのコンピュータは私のLinuxネットワークに接続されています。私のLinuxネットワークはBaschenサーバーを使用しています。

要塞サーバーに直接接続すると、すべてがうまく機能します。メインサーバーにプロキシしようとすると、動作が停止します。 2週間前にこの問題が発生しました。何の変更もなく動作が開始されました。 2週間働いた。今日はランダムに再び動作を停止しました。

Putty> Proxy> Telnet コマンドでこの plink 行を使用します。

plink.exe %user@%proxyhost -i "C:\Users\<user>\.ssh\bastion.ppk" -agent -nc %host:%port

要塞サーバーでは、両方のシステムがある程度同じログを持っていることがわかります。

動作しない:

Feb 12 16:06:39 bastionserver sshd[6554]: debug1: PAM: setting PAM_TTY to "ssh"
Feb 12 16:06:39 bastionserver sshd[6554]: debug2: monitor_read: 100 used once, disabling now
Feb 12 16:06:39 bastionserver sshd[6554]: debug3: mm_request_receive entering
Feb 12 16:06:39 bastionserver sshd[6554]: debug3: monitor_read: checking request 4
Feb 12 16:06:39 bastionserver sshd[6554]: debug3: mm_answer_authserv: service=ssh-connection, style=, role=
Feb 12 16:06:39 bastionserver sshd[6554]: debug2: monitor_read: 4 used once, disabling now
Feb 12 16:06:39 bastionserver sshd[6554]: debug3: receive packet: type 1 [preauth]
Feb 12 16:06:39 bastionserver sshd[6554]: error: Received disconnect from <client_ip> port 49763:14: No supported authentication methods available [preauth]

布材:

Feb 12 16:06:58 bastionserver sshd[6556]: debug1: PAM: setting PAM_TTY to "ssh"
Feb 12 16:06:58 bastionserver sshd[6556]: debug2: monitor_read: 100 used once, disabling now
Feb 12 16:06:58 bastionserver sshd[6556]: debug3: receive packet: type 50 [preauth]
Feb 12 16:06:58 bastionserver sshd[6556]: debug1: userauth-request for user screenreader service ssh-connection method publickey [preauth]
Feb 12 16:06:58 bastionserver sshd[6556]: debug1: attempt 1 failures 0 [preauth]
Feb 12 16:06:58 bastionserver sshd[6556]: debug2: input_userauth_request: try method publickey [preauth]
Feb 12 16:06:58 bastionserver sshd[6556]: debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA <SHA256> [preauth]
...

ベストアンサー1

サーバーを再起動した後、この問題が再発生しました。何が変わったのかはわかりませんが、再起動後にplinkコマンドで使用されているSSHキーを読み取ることはできません。

これはPuTTyプロキシページをクリックしてYes診断されます。Print proxy diagnostics in the terminal window

上記のパスのうち、実際には非常に重要です。ユーザー名は\ rで始まります。

したがって、実行しようとしないでください。 plink.exe %user@%proxyhost -i "C:\Users\rick\.ssh\bastion.ppk" -agent -nc %host:%port

実際に実行しようとしています。 plink.exe %user@%proxyhost -i "C:\Usersick\.ssh\bastion.ppk" -agent -nc %host:%port

おすすめ記事