Topic "SSH host key fingerprint "sha-rsa 2048 does not match patter"

Author Message
KindnessHelps
[View user's profile]

Joined: 2015-01-30
Posts: 2
I'm trying to transfer some files using the winscp.dll and receiving an exception on the fingerprint format.

This is the Server Options info I have from the winscp console.
#File transfer protocol = FTP
#Cryptographic protocol = TLS Explicit encryption, TLSv1.2
#Encryption algorithm = TLSv1/SSLv3: RC4-SHA, 2048 bit RSA
#Compression = No
#------------------------------------------------------------
#Certificate fingerprint
#78:b7:ed:6a:2a:6d:06:61:ae:7d:f6:e5:75:7c:0d:68:cc:aa:37:78

Here are some ways I've formatted the statements.
$sessionOptions.SshHostKeyFingerprint = "ssh-dss 2048 78:b7:ed:6a:2a:6d:06:61:ae:7d:f6:e5:75:7c:0d:68:cc:aa:37:78"
$sessionOptions.SshHostKeyFingerprint = "ssh-rsa 1024 78:b7:ed:6a:2a:6d:06:61:ae:7d:f6:e5:75:7c:0d:68:cc:aa:37:78"

This works but throws an error later saying it still needs a key.
$sessionOptions.SslHostCertificateFingerprint = "78:b7:ed:6a:2a:6d:06:61:ae:7d:f6:e5:75:7c:0d:68:cc:aa:37:78"

Not sure what I'm missing!

Thanks for help!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
In GUI you are obviously connected with FTP over TLS.
So you need to use the SessionOptions.SslHostCertificateFingerprint and set SessionOptions.Protocol to Ftp and SessionOptions.FtpSecure to Explicit (or ExplicitTls in older versions).
https://winscp.net/eng/docs/library_sessionoptions
_________________
Martin Prikryl
KindnessHelps
[View user's profile]

Joined: 2015-01-30
Posts: 2
Changed the above settings to the suggestions and added:
$sessionOptions.FtpSecure = [WinSCP.FtpSecure]::ExplicitTls
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License