The configuration i am trying to access has a TunnelServer which is accessed via Private Key + User. From this Server i need to get a Fingerprint and save it. Furthermore the SFTP Server behind the Tunnelserver is also sending out a Fingerprint which needs to be saved. To illustrate it a bit better here is the Configuration of the Constructor of my class:
_sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = application.FtpParameter.SftpHost,
UserName = application.FtpParameter.SftpUser,
Password = application.FtpParameter.SftpPassword,
PortNumber = application.FtpParameter.SftpPort,
SshHostKeyFingerprint = application.FtpParameter.SftpHostFingerprint
};
_sessionOptions.AddRawSettings("Tunnel", "1");
_sessionOptions.AddRawSettings("TunnelHostName", application.FtpParameter.SftpHostProxy);
_sessionOptions.AddRawSettings("TunnelUserName", "gw-user");
_sessionOptions.AddRawSettings("TunnelPublicKeyFile", application.FtpParameter.SftpPfadPrivateKey);
From the log it seems that i am only getting a Fingerprint of the Tunnel but have no way to get one of the Server behind. Do i need to configure 2 Sessions or something like this?
Is there furthermore a possibility to add a known Passphrase for the TunnelpublicKeyFile? For a SshPrivateKeyPath there is i know but i haven't found one for the Tunnel Private Key.
Thanks in advance.