I'm having trouble connecting to an sFTP server. Message is
This happens in the OnServerKeyValidation procedureObject name missing
Code: Select all
procedure TFGestionPackingList.DoServerKeyValidate(FileStorage: TScFileStorage;
const HostKeyName: string; NewServerKey: TScKey; var Accept: Boolean);
var
Key: TScKey;
fp, msg: string;
begin
Key := FileStorage.Keys.FindKey(HostKeyName);
showmessage('1');
if (Key = nil) or not Key.Ready then begin
NewServerKey.GetFingerPrint(haMD5, fp);
msg := 'The authenticity of server can not be verified.'#13#10 +
'Fingerprint for the key received from server: ' + fp + '.'#13#10 +
'Key length: ' + IntToStr(NewServerKey.BitCount) + ' bits.'#13#10 +
'Are you sure you want to continue connecting?';
if MessageDlg(msg, mtConfirmation, [mbOk, mbCancel], 0) = mrOk then begin
Key := TScKey.Create(nil);
showmessage('2');
try
Key.Assign(NewServerKey);
showmessage('3');
Key.KeyName := HostKeyName;
showmessage('4');
[color=#FF0000][b]FileStorage.Keys.Add(Key); <<== ERROR
showmessage('5');
except
Key.Free;
raise;
end;
Accept := True;
end;
end;
end;
This software is used directly on the server as an administrator
Could you help me ?
Cordially.