ユーザーがサーバーに初めてアクセスしたときに指紋を取得したい場合は、その指紋を保存します(これは問題ではありません。これを行う)。私の問題は、それがScanFingerprint()
と呼ばれる方法があると仮定していますが、私がそれを探しているときには表示されないということです。WinSCPとCでサーバーからSSHの指紋を取得する方法
https://winscp.net/eng/docs/library_session_scanfingerprint#parameters
、これを行う方法任意のアイデアを私が見つけた、しかし方法が表示されない何それ?
私はそのメソッドがどこにあるかを把握しようとしているが、私はこれを持っているため、このためのコードを、行っていませんでした正直に言うと、私はSshHostKeyFingerprint
プロパティに
TransferOptions = new TransferOptions();
SessionOptions = new SessionOptions();
MySession = new Session();
SessionOptions.HostName = InterfaceConnection.Host;
SessionOptions.UserName = InterfaceConnection.UserID;
SessionOptions.Password = InterfaceConnection.Password;
SessionOptions.PortNumber = InterfaceConnection.Port;
if (string.Compare(protocol.ProtocolUsed, "FTP", true) == 0)
SessionOptions.Protocol = WinSCP.Protocol.Ftp;
else if (string.Compare(protocol.ProtocolUsed, "SFTP", true) == 0)
{
SessionOptions.Protocol = WinSCP.Protocol.Sftp;
SessionOptions.SshHostKeyFingerprint = protocol.FingerPrint;
SessionOptions.SshPrivateKeyPath = "C:\\TestFiles\\SshKeys\\MyLocalSSHKey";
}
を設定するためにそれを使用することを計画しています
ありがとう@Martin Prikryl! 私はあなたがWinSCPの開発者であることがわかります!私は.dllでそれを探していた! ありがとうございました! –