Format of server version is invalid
Posted: Tue 16 Oct 2012 13:48
Hi there,
I know, the question has been asked before (http://forums.devart.com/viewtopic.php?t=22848#p76406) the resolution was however not posted in the forum...
Im receiving a "Format of server version is invalid" exception when connecting to a customer's SFTP server using this code (please note, that the password is invalid):
procedure TmyForm.foo;
begin
ScFileStorage := TScFileStorage.Create(nil);
ScSSHClient := TScSSHClient.Create(nil);
ScSFTPClient := TScSFTPClient.Create(nil);
ScSSHClient.KeyStorage := ScFileStorage;
ScSFTPClient.SSHClient := ScSSHClient;
ScSSHClient.HostName := 'data.eon.leadflow.nl';
ScSSHClient.User := '[email protected]';
ScSSHClient.Password := 'blabla'; // password is invalid!
ScSSHClient.Port := 21;
ScSSHClient.OnServerKeyValidate := ScSSHClientServerKeyValidate;
ScSSHClient.Authentication := atPassword;
ScSSHClient.Connect;
end;
procedure TmyForm.ScSSHClientServerKeyValidate(Sender: TObject; NewServerKey: TScKey; var Accept: Boolean);
begin
Accept := True;
end;
Any suggestions?`
Thanks in advance
Ulf
I know, the question has been asked before (http://forums.devart.com/viewtopic.php?t=22848#p76406) the resolution was however not posted in the forum...
Im receiving a "Format of server version is invalid" exception when connecting to a customer's SFTP server using this code (please note, that the password is invalid):
procedure TmyForm.foo;
begin
ScFileStorage := TScFileStorage.Create(nil);
ScSSHClient := TScSSHClient.Create(nil);
ScSFTPClient := TScSFTPClient.Create(nil);
ScSSHClient.KeyStorage := ScFileStorage;
ScSFTPClient.SSHClient := ScSSHClient;
ScSSHClient.HostName := 'data.eon.leadflow.nl';
ScSSHClient.User := '[email protected]';
ScSSHClient.Password := 'blabla'; // password is invalid!
ScSSHClient.Port := 21;
ScSSHClient.OnServerKeyValidate := ScSSHClientServerKeyValidate;
ScSSHClient.Authentication := atPassword;
ScSSHClient.Connect;
end;
procedure TmyForm.ScSSHClientServerKeyValidate(Sender: TObject; NewServerKey: TScKey; var Accept: Boolean);
begin
Accept := True;
end;
Any suggestions?`
Thanks in advance
Ulf