Accepting multiple Fingerprints via ScanFingerprint? Passphrase for TunnelPublicKeyfile

Advertisement

Nosdasil
Guest

Accepting multiple Fingerprints via ScanFingerprint? Passphrase for TunnelPublicKeyfile

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,253
Location:
Prague, Czechia

Re: Accepting multiple Fingerprints via ScanFingerprint? Passphrase for TunnelPublicKeyfile

You have to create separate SessionOptions for the tunnel host to get its fingerprint.

There's no way to set passphrase for a tunnel session. You have to use an unencrypted private key for a tunnel.

Reply with quote

Advertisement

You can post new topics in this forum