簡體   English   中英

帶有indy / delphi的安全ftp->文件上傳和下載

[英]secure ftp with indy / delphi -> file upload & download

我需要將文件上傳到安全的ftp共享,我只知道來自FILE ZILLA Ftp客戶端的配置數據。 協議是SSH,安全FTP

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
 - <FileZilla3>
 - <Servers>
 - <Server>
 <Host>example.com</Host> 
 <Port>22</Port> 
 <Protocol>1</Protocol> 
 <Type>0</Type> 
 <User>Username-FTP</User> 
 <Pass>*************/Pass> 
 <Logontype>1</Logontype> 
 <TimezoneOffset>0</TimezoneOffset> 
 <PasvMode>MODE_DEFAULT</PasvMode> 
 <MaximumMultipleConnections>0</MaximumMultipleConnections> 
 <EncodingType>Auto</EncodingType> 
 <BypassProxy>0</BypassProxy> 
 <Name>Ftp_sharename</Name> 
 <Comments /> 
 <LocalDir /> 
 <RemoteDir>8 0 15 dsd_dir</RemoteDir> 
 <SyncBrowsing>0</SyncBrowsing> 
  Ftp_server_name
   </Server>
   </Servers>
 </FileZilla3>

用像這樣的代碼

 procedure TForm1.btnConnectClick(Sender: TObject);
 begin
  if IdFTP1.Connected then
  begin
  IdFtp1.Disconnect;
  btnConnect.Caption := 'Verbinden';
  ListBox1.Clear;
 end
 else begin
 IdFTP1.Host := edHost.Text;
 IdFtp1.Username := edUser.Text;
 IdFtp1.Password := edPassword.Text;
 IdFtp1.Port := StrToINt(edport.Text);
 IdFtp1.Connect;
 end;
end;

使用INDY 10-IdFTP1:TIdFTP; 沒有多少運氣。 沒有找到與我的Delphi更好的功能。

SFTP (基於SSH的FTP)與FTPS (基於SSL / TLS的FTP)不同。 目前,Indy根本不支持SSH。 TIdFTP確實支持FTPS。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM