(using latest version of sbridge on Lazarus 2.06)
Code: Select all
12/18/2019 01:30:00 PM:[Error] SSH Client(127.0.0.1:50920) ERROR for user:testuser:Error on data reading from the connection:
An established connection was aborted by the software in your host machine..
Is this the proper way to use the devart SFTP Client?
Code: Select all
sftpmod.SSH.HostName:=maindatamod.FTPAddress;
sftpmod.SSH.Port:=10022;
sftpmod.SSH.User:=username;
sftpmod.SSH.Password:=PassWord;
sftpmod.SSH.Connect;
if sftpmod.SSH.Connected then
begin
if not sftpmod.SFTP.Active then
sftpmod.SFTP.Initialize;
sftpmod.SFTP.UploadFromStream(astream,'/'+testfilename,true);
MessageDlg(self,'Success','Test file uploaded successfully.',mtInformation,[mbok],0);
sftpmod.sftp.Disconnect;
sftpmod.SSH.Connected:=false;
end;