Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Obtaining fingerprint for SFTP

jricci9999 wrote:

Thanks for that poiter. I'll take a look. My usage is always to a very small set of known sites. I could easily store these values and validate they have not changed. Would that be the best way to ensure the transfer is secure?

It's not the best way. But it's acceptable. It's all covered in the FAQ linked above.
jricci9999

Re: Obtaining fingerprint for SFTP

martin wrote:

But you should not use Session.ScanFingerprint to obtain the fingerprint automatically.
That's just a less effective way to do what SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey does.

See https://winscp.net/eng/docs/faq_hostkey


Thanks for that poiter. I'll take a look. My usage is always to a very small set of known sites. I could easily store these values and validate they have not changed. Would that be the best way to ensure the transfer is secure?
martin

Re: Obtaining fingerprint for SFTP

But you should not use Session.ScanFingerprint to obtain the fingerprint automatically.
That's just a less effective way to do what SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey does.

See https://winscp.net/eng/docs/faq_hostkey
jricci9999

Re: Obtaining fingerprint for SFTP

jricci9999 wrote:

It seems there is a way to obtain the SshHostKeyFingerprint value from a site. I can do this with various tools, but not programmatically. This appears to be necessary to access an SFTP site through the API. I have been searching around for an example of how to do this, but so far have not found it. Am I missing the obvious? Is there something in the winscpnet API which can do this for me? Is there a code example somewhere? Thanks for any help.


I found the function. It's Session.ScanFingerprint(SessionOption options, String algorithm).
jricci9999

Obtaining fingerprint for SFTP

It seems there is a way to obtain the SshHostKeyFingerprint value from a site. I can do this with various tools, but not programmatically. This appears to be necessary to access an SFTP site through the API. I have been searching around for an example of how to do this, but so far have not found it. Am I missing the obvious? Is there something in the winscpnet API which can do this for me? Is there a code example somewhere? Thanks for any help.