Re: How to connect FTP Passive Implicit with Certificate
That makes sense thanks for the update.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
SslHostCertificateFingerprint
was renamed to TlsHostCertificateFingerprint
.
SslHostCertificateFingerprint
?
I am confused about the regex above. Both my fingerprint and the original question have 20 pairs of hex numbers, but the regex only matches 15. I am surprised that this is expected to work.
SshHostKeyFingerprint
, but you are using FTP over TLS, not SSH. You need to set TlsHostCertificateFingerprint
.
ssh-rsa 2048
to the beginning of the string I assign to SshHostKeyFingerprint
doesn't make the regex exception go away.
SessionOptions
:
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
FtpMode = FtpMode.Passive,
PortNumber = 21,
FtpSecure = FtpSecure.Explicit,
HostName = "162.253.127.64",
UserName = "--------",
Password = "--------",
SshHostKeyFingerprint = "ssh-rsa 2048 e7:d5:b0:a4:6f:24:7f:15:5c:c1:ae:b9:43:c1:86:95:7e:97:35:85"
};
System.ArgumentException was caught
HResult=-2147024809
Message=SSH host key fingerprint "ssh-rsa 2048 e7:d5:b0:a4:6f:24:7f:15:5c:c1:ae:b9:43:c1:86:95:7e:97:35:85" does not match pattern /((ssh-rsa|ssh-dss)( |-))?(\d+ )?([0-9a-f]{2}(:|-)){15}[0-9a-f]{2}(;((ssh-rsa|ssh-dss)( |-))?(\d+ )?([0-9a-f]{2}(:|-)){15}[0-9a-f]{2})*/
Source=WinSCPnet
StackTrace:
at WinSCP.SessionOptions.SetSshHostKeyFingerprint(String s)
at WinSCP.SessionOptions.set_SshHostKeyFingerprint(String value)
at Program.Main(String[] args) in C:\Users\Me\Documents\Visual Studio 2010\Projects\WinScpTool\Program.cs:line 16
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
FtpMode = FtpMode.Passive,
FtpSecure = FtpSecure.Implicit,
PortNumber = 990,
UserName = "----",
Password = "----",
HostName = "ftp.-----.com",
SslHostCertificateFingerprint = "e6:a3:7a:56:5b:e3:bb:0d:1c:34:58:bd:47:94:79:75:32:2b:70:4d"
};
FSProtocol
5
Ftps
1
PortNumber
990
FtpsCertificates
e6:a3:7a:56:5b:e3:bb:0d:1c:34:58:bd:47:94:79:75:32:2b:70:4d
SSL host certificate fingerprint "ssh-rsa 1024 e6:a3:7a:56:5b:e3:bb:0d:1c:34:58:bd:47:94:79:75:32:2b:70:4d" does not match pattern /([0-9a-f]{2}:){19}[0-9a-f]{2}/
SessionOptions sessionOptions = new SessionOptions
{
Protocol = WinSCP.Protocol.Ftp,
FtpMode = FtpMode.Passive,
FtpSecure = FtpSecure.Implicit,
PortNumber = 990,
UserName = "--------",
Password = "--------",
HostName = "ftp.----.com",
SslHostCertificateFingerprint = "ssh-rsa 1024 e6:a3:7a:56:5b:e3:bb:0d:1c:34:58:bd:47:94:79:75:32:2b:70:4d"
};
SSH host key fingerprint "ssh-rsa 1024 e6:a3:7a:56:5b:e3:bb:0d:1c:34:58:bd:47:94:79:75:32:2b:70:4d" does not match pattern /(ssh-rsa |ssh-dss )?\d+ ([0-9a-f]{2}:){15}[0-9a-f]{2}/
SessionOptions sessionOptions = new SessionOptions
{
Protocol = WinSCP.Protocol.Ftp,
FtpMode = FtpMode.Passive,
FtpSecure = FtpSecure.Implicit,
PortNumber = 990,
UserName = "--------",
Password = "--------",
HostName = "ftp.----.com",
SshHostKeyFingerprint = "ssh-rsa 1024 e6:a3:7a:56:5b:e3:bb:0d:1c:34:58:bd:47:94:79:75:32:2b:70:4d"
};