1

C# (.NET Assembly) を使用して SFTP WinSCP クライアントを開発しています。私のテスト環境では、パスワード認証で行いました。ここに私のセッションオプションがあります:

// Setup session options
SessionOptions sessionOptions = new SessionOptions {
    Protocol = Protocol.Sftp,
    HostName = "example.com",
    UserName = "user",
    Password = "mypassword",
    SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};

しかし、実際の環境にはユーザーのパスワードがありません。サーバー管理者は、拡張子が「.crt」の公開鍵を提供します

では、この公開鍵を使用してプログラムを変更するにはどうすればよいでしょうか ( SessionOptions)?

この詳細は、この実装を進めるのに十分ですか?

crt ファイルのプレビュー

ここに画像の説明を入力

4

1 に答える 1