結論
Remote capture command で echo [password] | sudo -S tcpdump [filter] するときは、 Remote capture command selection を Other にする
sshdumpについて
sshdumpは、SSH接続先のホストでパケットキャプチャをし、WiresharkのGUI画面で表示できるコンポーネントです。
接続先ホストでのtcpdumpの実行にroot権限とパスワード入力が必要な場合、sshdumpの設定画面でRemote Capture Commandに echo [password] | sudo -S tcpdump [filter] という形式でコマンドを入力します。
エラー内容
Wireshark4.2.3 on macOS Sonoma 14.3.1 で上記記事の通りの設定を行ったところ、以下のエラーが出ました。
Error from extcap pipe: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
解決方法
エラー発生時、上記記事のスクリーンショットには存在しなかったオプションである Remote capture command selection が tcpdump になっていました。
Remote capture command selection を Other にすると、エラーが表示されず、キャプチャに成功しました。
参考:CLIコマンドとの対応
sshdumpにはCLI版があり、 Remote capture command selection と Remote capture command はそれぞれ --remote-capture-command-select オプションと --remote-capture-command オプションに対応するものと思われます。
sshdumpのドキュメントの --remote-capture-command-select の説明には、以下の記載があります。
The selection of the build-in support for remote capture commands. Either dumpcap for a remote capture command using dumpcap, tcpdump for a remote capture command using tcpdump, or other, where the remote capture command is to be given with the --remote-capture-command option.
--remote-capture-command-select で tcpdump を選択すると、ビルドインのtcpdumpが使用され、 --remote-capture-command でのコマンド指定が無視されてしまうようです。今回のエラーは、同様のことがWireshark上のsshdumpでも起きたものと考えられます。

